List of canidate identifiers support
[optf/osdf.git] / osdf / optimizers / placementopt / conductor / translation.py
index e09ecd3..d14f3e1 100644 (file)
@@ -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