summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/slice_selection/optimizers/conductor/remote_opt_processor.py5
-rw-r--r--osdf/adapters/conductor/conductor.py2
2 files changed, 4 insertions, 3 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)
diff --git a/osdf/adapters/conductor/conductor.py b/osdf/adapters/conductor/conductor.py
index 6749c2c..49c123d 100644
--- a/osdf/adapters/conductor/conductor.py
+++ b/osdf/adapters/conductor/conductor.py
@@ -71,7 +71,7 @@ def request(req_info, demands, request_parameters, service_info, template_fields
if resp["plans"][0].get("status") in ["error"]:
raise RequestException(response=raw_resp, request=raw_resp.request)
- if resp["plans"][0].get("status") in ["done", "not found"]:
+ if resp["plans"][0].get("status") in ["done", "not found", "solved"]:
return resp
new_url = resp['plans'][0]['links'][0][0]['href'] # TODO(krishna): check why a list of lists