diff options
author | Vikas Varma <vikas.varma@att.com> | 2020-04-22 01:33:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-22 01:33:52 +0000 |
commit | d4a0085a8f75c62912d19613459ad1bc3dce3e73 (patch) | |
tree | c357a3584ba8bdbd63bedef17011bbf37143c17b /apps | |
parent | 2ac2b0c1c177dfec588b9c3439a41340d555897b (diff) | |
parent | 2754404822b496392717d260681946debecf8648 (diff) |
Merge "add aggregation policy for NSI selection"
Diffstat (limited to 'apps')
-rw-r--r-- | apps/slice_selection/optimizers/conductor/remote_opt_processor.py | 7 |
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 |