-
Bug
-
Resolution: Done
-
Medium
-
Casablanca Release
-
None
-
None
-
OOF-Casablanca-Sprint-2, OOF-Casablanca-Sprint-3
There's a gap between the DM and the current policy model(No grouping inside TOSCA DM). In R2, we have multiple values under 'hpa-feature-attributes' grouped by one 'hpa-feature'. However, there's actually no such grouping inside TOSCA DM. So in R3, this grouping will be spilt. Which means each 'hpa-feature-attributes' will only contain one KV pair inside and there will be many constraints with the same 'hpa-feature' name.
Nevertheless, the format used in AAI still left unchanged with that grouping idea. So when comparing for mandatory requirements, there will more hpa-features added inside req_filter_list(data from Policy), but less number in flavor_filter_list(data from AAI). And thus causing a mismatch in OOF.
Two solutions for this:
Since AAI is not changed now, just remove the duplicate values in req_filter_list in this release. As the data in AAI is the universal set of the kind of 'hpa-feature'.
(ii) When first filtering mandatory requirement, not only compare 'hpa-feature', 'hpa-version' and 'architecture', but also compare each 'hpa-attribute-key' under 'hpa-feature-attributes'.
Now I'm fixing with solution .
Old Policy Model used in Beijing:
{ "flavorLabel": "flavor_label_vm_01", "flavorProperties":[ { "hpa-feature" : "basicCapabilities", "mandatory" : "False", "architecture": "generic", "hpa-version": "v1", "hpa-feature-attributes": [ {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}, {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""} ] } ] }
New policy looks like this:
{ "flavorLabel": "flavor_label_vm_01", "flavorProperties":[ { "hpa-feature" : "basicCapabilities", "mandatory" : "False", "architecture": "generic", "hpa-version": "v1", "hpa-feature-attributes": [ {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"} ] }, { "hpa-feature" : "basicCapabilities", "mandatory" : "True", "architecture": "generic", "hpa-version": "v1", "hpa-feature-attributes": [ {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""} ] } ] }