diff options
author | Shankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com> | 2018-10-08 17:50:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-08 17:50:20 +0000 |
commit | c9cf683edb9fab83698c5e1801df89dd78a3300f (patch) | |
tree | 5b418eab1ab326fcadea8e17047c2f9d3cf92ee4 | |
parent | c7dd83984dc49f5f2a83de5581c23ea00639d5ba (diff) | |
parent | 35542db90b214695f96331154f11fb9e2ac1420a (diff) |
Merge "Fix HAS CSIT bugs"
-rw-r--r-- | conductor/conductor/common/prometheus_metrics.py | 2 | ||||
-rw-r--r-- | conductor/conductor/solver/optimizer/random_pick.py | 1 | ||||
-rw-r--r-- | conductor/conductor/solver/service.py | 2 |
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, |