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:
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)
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