summaryrefslogtreecommitdiffstats
path: root/apps/slice_selection/optimizers
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2021-07-14 12:23:17 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2021-07-14 13:15:59 +0530
commit555e5727d1c818108ff255a1b9fe4542b768ad5c (patch)
treeeb259474ebe99a36b4c435ff32be65018aa10435 /apps/slice_selection/optimizers
parentcdf57b8d8bb5b340de33110631f24f472d4da9ae (diff)
Fix issues in Slice selection
Issue-ID: OPTFRA-983 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I0dc22bc4bc65853b6693b603554e4dc99717d176
Diffstat (limited to 'apps/slice_selection/optimizers')
-rw-r--r--apps/slice_selection/optimizers/conductor/remote_opt_processor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/slice_selection/optimizers/conductor/remote_opt_processor.py b/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
index 3c140c5..68c9409 100644
--- a/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
+++ b/apps/slice_selection/optimizers/conductor/remote_opt_processor.py
@@ -52,7 +52,8 @@ class SliceSelectionOptimizer(Thread):
try:
if self.model_type == 'NSSI' \
- and self.request_json['sliceProfile'].get('resourceSharingLevel', "") == 'not-shared':
+ and self.request_json['sliceProfile'].get('resourceSharingLevel', "") \
+ in ['not-shared', 'non-shared']:
final_response = self.response_processor.get_slice_selection_response([])
else:
@@ -97,7 +98,7 @@ class SliceSelectionOptimizer(Thread):
except RequestException as e:
resp = e.response.json()
error = resp['plans'][0]['message']
- if "Unable to find any" in error:
+ if isinstance(error, list) and "Unable to find any" in error[0]:
return self.response_processor.get_slice_selection_response([])
error_log.error('Error from conductor {}'.format(error))
return self.response_processor.process_error_response(error)