summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--osdf/optimizers/placementopt/conductor/translation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/osdf/optimizers/placementopt/conductor/translation.py b/osdf/optimizers/placementopt/conductor/translation.py
index f1c12c8..6e42ba2 100644
--- a/osdf/optimizers/placementopt/conductor/translation.py
+++ b/osdf/optimizers/placementopt/conductor/translation.py
@@ -247,6 +247,7 @@ def gen_demands(req_json, vnf_policies):
"""
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