Fix to remove resources with no policies from the HAS template
Issue-ID: OPTFRA-247
Change-Id: I8762a5ac13038406d74ee2806a52f78b6df697a2
Signed-off-by: Patel, Ankitkumar <ankit@research.att.com>
"""
demand_dictionary = {}
for demand in req_json['placementInfo']['placementDemands']:
- demand_dictionary.update(
- {demand['resourceModuleName']: get_demand_properties(demand, vnf_policies)})
+ prop = get_demand_properties(demand, vnf_policies)
+ if len(prop) > 0:
+ demand_dictionary.update({demand['resourceModuleName']: prop})
return demand_dictionary