diff options
author | Ruoyu Ying <ruoyu.ying@intel.com> | 2018-08-24 01:13:23 +0800 |
---|---|---|
committer | Ruoyu Ying <ruoyu.ying@intel.com> | 2018-08-24 01:27:58 +0800 |
commit | dda38c4849be077910df86cbe40f59db7a67b0c8 (patch) | |
tree | 6f6ccd81e1885e3b9dbb81d8e42a9e7b0a1f486f | |
parent | 9171132c130c2e5724a0266d4a3a25d56e4b9e7b (diff) |
Support multiple policies with same hpa-feature
Support to resolve multiple policies with same "hpa-feature" name
Change-Id: I86d1f20ad28e30893535688460b8ef6ff1153cd3
Issue-ID: OPTFRA-323
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
-rw-r--r-- | conductor/conductor/data/plugins/inventory_provider/hpa_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/conductor/conductor/data/plugins/inventory_provider/hpa_utils.py b/conductor/conductor/data/plugins/inventory_provider/hpa_utils.py index 3cd2cfb..24f901b 100644 --- a/conductor/conductor/data/plugins/inventory_provider/hpa_utils.py +++ b/conductor/conductor/data/plugins/inventory_provider/hpa_utils.py @@ -66,7 +66,8 @@ class HpaMatchProvider(object): if capability.item['mandatory'] == 'True': hpa_list = {k: capability.item[k] \ for k in hpa_keys if k in capability.item} - req_filter_list.append(hpa_list) + if hpa_list not in req_filter_list: + req_filter_list.append(hpa_list) max_score = -1 flavor_map = None for flavor in self.flavors_list: |