summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Varma <vikas.varma@att.com>2020-11-15 22:29:54 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-15 22:29:54 +0000
commit42c59718c3e9320e04e73ce1d84278bf4715413d (patch)
treef33102783234fea87173b26d1c3048b332dbe156
parent078e0e852782b8a617f11f7749edfa79e4f563ec (diff)
parent7ec41c19e5b894fbe06b2020f4fe399b461ce05e (diff)
Merge "Remove lower case conversion of subnet"
-rw-r--r--apps/slice_selection/optimizers/conductor/remote_opt_processor.py2
-rw-r--r--apps/slice_selection/optimizers/conductor/response_processor.py2
-rw-r--r--test/apps/slice_selection/new_solution_nsi_response.json4
3 files changed, 4 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 432655b..0fbf36e 100644
--- a/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
+++ b/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
@@ -114,7 +114,7 @@ class SliceSelectionOptimizer(Thread):
subnet_capabilities = self.request_json.get('subnetCapabilities')
if subnet_capabilities:
for subnet_capability in subnet_capabilities:
- domain_type = f"{subnet_capability['domainType'].lower().replace('-', '_')}_"
+ domain_type = f"{subnet_capability['domainType']}_"
capability_details = subnet_capability['capabilityDetails']
for key, value in capability_details.items():
request_params[f"{domain_type}{camel_to_snake[key]}"] = value
diff --git a/apps/slice_selection/optimizers/conductor/response_processor.py b/apps/slice_selection/optimizers/conductor/response_processor.py
index 71a350f..d2c949b 100644
--- a/apps/slice_selection/optimizers/conductor/response_processor.py
+++ b/apps/slice_selection/optimizers/conductor/response_processor.py
@@ -67,7 +67,7 @@ class ResponseProcessor(object):
return {
'existingNSI': False,
'newNSISolution': {
- 'slice_profiles': self.get_slice_profiles_from_candidate(candidate, subnets)
+ 'sliceProfiles': self.get_slice_profiles_from_candidate(candidate, subnets)
}
}
diff --git a/test/apps/slice_selection/new_solution_nsi_response.json b/test/apps/slice_selection/new_solution_nsi_response.json
index 2ecb543..3fbeffe 100644
--- a/test/apps/slice_selection/new_solution_nsi_response.json
+++ b/test/apps/slice_selection/new_solution_nsi_response.json
@@ -7,7 +7,7 @@
{
"existingNSI": false,
"newNSISolution": {
- "slice_profiles": [
+ "sliceProfiles": [
{
"domainType": "AN",
"resourceSharingLevel": "shared",
@@ -32,4 +32,4 @@
}
}
]
-} \ No newline at end of file
+}