diff options
-rw-r--r-- | conductor/conductor/data/plugins/inventory_provider/dcae.py | 13 | ||||
-rw-r--r-- | conductor/requirements.txt | 1 |
2 files changed, 8 insertions, 6 deletions
diff --git a/conductor/conductor/data/plugins/inventory_provider/dcae.py b/conductor/conductor/data/plugins/inventory_provider/dcae.py index 02f7c79..4b6d8d1 100644 --- a/conductor/conductor/data/plugins/inventory_provider/dcae.py +++ b/conductor/conductor/data/plugins/inventory_provider/dcae.py @@ -186,7 +186,8 @@ class DCAE(object): else: LOG.debug("No difference attribute was added to the candidate") else: - candidate = candidate + candidate["ulthpt_difference"] = 2 + candidate["dlthpt_difference"] = 2 LOG.debug("Returning original candidate list") candidatesList.update(candidate) LOG.debug("capacity filter ", candidatesList) @@ -257,12 +258,12 @@ class DCAE(object): dcae_response = self._request('get', path, data=data) LOG.debug(self._request('get', path, data=data)) LOG.debug(" DCAE response : ", dcae_response) - LOG.debug("DCAE json response is : ", json.dumps(dcae_response.json())) - dcae_response2 = json.dumps(dcae_response.json()) - LOG.debug(" processed DCAE response is ", dcae_response2) - if dcae_response2 is None or dcae_response.status_code != 200: + if dcae_response is None or dcae_response.status_code != 200: return None - if dcae_response2: + if dcae_response: + LOG.debug("DCAE json response is : ", json.dumps(dcae_response.json())) + dcae_response2 = json.dumps(dcae_response.json()) + LOG.debug(" processed DCAE response is ", dcae_response2) responseJson = json.loads(dcae_response2) LOG.debug("response json from DCAE is :", responseJson) if 'sliceConfigDetails' not in responseJson or len(responseJson['sliceConfigDetails']) == 0: diff --git a/conductor/requirements.txt b/conductor/requirements.txt index 36bd314..eb6eba6 100644 --- a/conductor/requirements.txt +++ b/conductor/requirements.txt @@ -31,3 +31,4 @@ jsonschema>=3.2.0 tosca-parser>=2.2.0 etcd3==0.12.0 grpcio==1.42.0 +WebTest==3.0.0 |