The fix changes how required and excluded candiates list
is generated for HAS request by OSDF. After the change it
is now alligned with request format of HAS.
Change-Id: I6c4a88c3672971e53b996d416caeda63771e08c1
Issue-ID: OPTFRA-483
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
for k, v in policy_config_mapping['candidates'].items():
if k not in demand:
continue
- res[v] = [{'inventory_type': x['identifierType'], 'candidate_id': x['identifiers']} for x in demand[k]]
+ 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})
return res
"service_type": "vFW-SINK-XX",
"excluded_candidates": [{
"inventory_type": "vfmodule",
- "candidate_id": ["e765d576-8755-4145-8536-0bb6d9b1dc9a"]
+ "candidate_id": "e765d576-8755-4145-8536-0bb6d9b1dc9a"
}]
}],
"vPGN": [{