diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2019-07-29 12:18:51 +0200 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2019-07-29 12:19:47 +0200 |
commit | ba5f7f0c456ef1804805302a813d964993b46827 (patch) | |
tree | 8e938f52d980c613239327ecd343fdaadc7eca6c /osdf | |
parent | e4849d9e08f994766856d16160ffbd011dd1b109 (diff) |
List of canidate identifiers support
List of candidate identifers in required and excluded
candidates list now is supported only as a list
Issue-ID: OPTFRA-486
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Change-Id: I2fdc11bc23239eeb1500c95925f8779da89dfcaf
Diffstat (limited to 'osdf')
-rw-r--r-- | osdf/optimizers/placementopt/conductor/translation.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/osdf/optimizers/placementopt/conductor/translation.py b/osdf/optimizers/placementopt/conductor/translation.py index e09ecd3..d14f3e1 100644 --- a/osdf/optimizers/placementopt/conductor/translation.py +++ b/osdf/optimizers/placementopt/conductor/translation.py @@ -206,10 +206,7 @@ def get_candidates_demands(demand): for k, v in policy_config_mapping['candidates'].items(): if k not in demand: continue - res[v] = list() - for x in demand[k]: - for candidate_id in x['identifiers']: - res[v].append({'inventory_type': x['identifierType'], 'candidate_id': candidate_id}) + res[v] = [{'inventory_type': x['identifierType'], 'candidate_id': x['identifiers']} for x in demand[k]] return res |