Added policy for hpa_score optimization function for vCPE with weights.
Change-Id: Ic6f3081510cbe94c519bcb7b2a7a99137bc29e12
Issue-ID: OPTFRA-313
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
for policy in optimization_policy:
content = policy['content']
parameter_list = []
- parameters = ["cloud_version"]
+ parameters = ["cloud_version", "hpa_score"]
for attr in content['objectiveParameter']['parameterAttributes']:
parameter = attr['parameter'] if attr['parameter'] in parameters else attr['parameter']+"_between"
"parameter": "distance",
"weight": "1",
"operator": "product"
+ },
+ {
+ "resources": ["vG"],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
}
],
"operator": "sum"
"parameter": "distance",
"weight": "1",
"operator": "product"
+ },
+ {
+ "resources": ["vG"],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
}
],
"operator": "sum"