From 2754404822b496392717d260681946debecf8648 Mon Sep 17 00:00:00 2001 From: dhebeha Date: Fri, 10 Apr 2020 06:38:11 -0700 Subject: add aggregation policy for NSI selection made changes for other policy updates Issue-ID: OPTFRA-730 Signed-off-by: dhebeha Change-Id: I3fb4ae184cdae9181037fb059ac144070228c29f --- apps/slice_selection/optimizers/conductor/remote_opt_processor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/slice_selection') 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 -- cgit 1.2.3-korg