summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conductor/conductor/common/prometheus_metrics.py2
-rw-r--r--conductor/conductor/solver/optimizer/random_pick.py1
-rw-r--r--conductor/conductor/solver/service.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/conductor/conductor/common/prometheus_metrics.py b/conductor/conductor/common/prometheus_metrics.py
index 6798cb1..93034c8 100644
--- a/conductor/conductor/common/prometheus_metrics.py
+++ b/conductor/conductor/common/prometheus_metrics.py
@@ -59,7 +59,7 @@ VNF_SUB_OPTIMUM = Counter(
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
diff --git a/conductor/conductor/solver/optimizer/random_pick.py b/conductor/conductor/solver/optimizer/random_pick.py
index 3130d8f..79750a6 100644
--- a/conductor/conductor/solver/optimizer/random_pick.py
+++ b/conductor/conductor/solver/optimizer/random_pick.py
@@ -39,6 +39,7 @@ class RandomPick(search.Search):
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
diff --git a/conductor/conductor/solver/service.py b/conductor/conductor/solver/service.py
index bb63d5a..9d7f13b 100644
--- a/conductor/conductor/solver/service.py
+++ b/conductor/conductor/solver/service.py
@@ -520,7 +520,7 @@ class SolverService(cotyledon.Service):
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,