Homing template with no optimization is throwing List IndexOutofBound
exception. Intitialized triageSolver in RandomPick algorithm.
Used iterator to read K,V pair from flavor_maps.
Labels were wrongly initialized in the VNF_SCORE metric.
Change-Id: Icbf1b9aaa0bb7899980680a55754ea7282810adb
Issue-ID: OPTFRA-366
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
VNF_SCORE = Counter(
'vnf_scores',
'HPA Scores of vnf',
- ['customer_name', 'service_name', 'vnf_name', 'vnfc_name', 'hpa_score']
+ ['customer_name', 'service_name', 'vnf_name', 'hpa_score']
)
# HPA Matching stats
def _find_current_best(self, _demand_list, _decision_path, _request):
+ self.triageSolver.getSortedDemand(_demand_list)
for demand in _demand_list:
# apply the constraints on all candidates first
_decision_path.current_demand = demand
m_hpa_score = resource.get("hpa_score", 0)
m_svc_name = p.template['parameters'].get(
'service_name', 'N/A')
- for vnfc, flavor in resource.get("flavor_map"):
+ for vnfc, flavor in resource.get("flavor_map").iteritems():
PC.VNF_COMPUTE_PROFILES.labels('ONAP',
m_svc_name,
demand_name,