summaryrefslogtreecommitdiffstats
path: root/apps/slice_selection/optimizers/conductor
diff options
context:
space:
mode:
authordhebeha <dhebeha.mj71@wipro.com>2020-04-10 06:38:11 -0700
committerdhebeha <dhebeha.mj71@wipro.com>2020-04-17 00:07:46 -0700
commit2754404822b496392717d260681946debecf8648 (patch)
tree92b5930025f4655e67e26b37b728526fac6e9edc /apps/slice_selection/optimizers/conductor
parent16dec1253f5380df53ccfef97d618fbe03e7be64 (diff)
add aggregation policy for NSI selection
made changes for other policy updates Issue-ID: OPTFRA-730 Signed-off-by: dhebeha <dhebeha.mj71@wipro.com> Change-Id: I3fb4ae184cdae9181037fb059ac144070228c29f
Diffstat (limited to 'apps/slice_selection/optimizers/conductor')
-rw-r--r--apps/slice_selection/optimizers/conductor/remote_opt_processor.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/slice_selection/optimizers/conductor/remote_opt_processor.py b/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
index a44fc4e..edad9ba 100644
--- a/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
+++ b/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
@@ -59,7 +59,7 @@ def process_nsi_selection_opt(request_json, osdf_config):
demands = get_slice_demands(nst_name, policies, osdf_config.core)
- request_parameters = {}
+ request_parameters = request_json.get('serviceProfile',{})
service_info = {}
req_info['numSolutions'] = 'all'
resp = conductor.request(req_info, demands, request_parameters, service_info, False,
@@ -90,15 +90,14 @@ def get_slice_demands(model_name, policies, config):
:return: list of demands for the request
"""
group_policies = group_policies_gen(policies, config)
- subscriber_policy_list = group_policies["onap.policies.optimization.SubscriberPolicy"]
+ subscriber_policy_list = group_policies["onap.policies.optimization.service.SubscriberPolicy"]
slice_demands = list()
for subscriber_policy in subscriber_policy_list:
policy_properties = subscriber_policy[list(subscriber_policy.keys())[0]]['properties']
if model_name in policy_properties["services"]:
- subnet_attributes = policy_properties["properties"]["subscriberRole"][0]
for subnet in policy_properties["properties"]["subscriberName"]:
slice_demand = dict()
slice_demand["resourceModuleName"] = subnet
- slice_demand['resourceModelInfo'] = subnet_attributes[subnet]
+ slice_demand['resourceModelInfo'] = {}
slice_demands.append(slice_demand)
return slice_demands