diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java | 11 | ||||
-rw-r--r-- | src/main/resources/jolt/getServiceInventory.json | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java b/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java index a09917c..b9afe64 100644 --- a/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java +++ b/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java @@ -81,10 +81,13 @@ public class AaiClient extends BaseClient { public Map getVNF(String relatedLink) { StringBuilder callURL = new StringBuilder().append(aaiHost).append(relatedLink); - - ResponseEntity<Object> response = callApiGet(callURL.toString(), buildRequestHeaderForAAI()); - return (LinkedHashMap) response.getBody(); - + try{ + ResponseEntity<Object> response = callApiGet(callURL.toString(), buildRequestHeaderForAAI()); + return (LinkedHashMap) response.getBody(); + } catch (BackendFunctionalException e) { + LOGGER.error("error on calling {} , {}" , callURL.toString(), e); + return null; + } } public Map getServicesInAaiForCustomer(String customerId) { diff --git a/src/main/resources/jolt/getServiceInventory.json b/src/main/resources/jolt/getServiceInventory.json index df4f14c..cb75530 100644 --- a/src/main/resources/jolt/getServiceInventory.json +++ b/src/main/resources/jolt/getServiceInventory.json @@ -4,6 +4,7 @@ "spec": { "service-instance-id": "id", "service-instance-name": "name", + "orchestration-status": "state", "model-version-id" : "serviceSpecification.id", "model-invariant-id": "serviceSpecification.invariantUUID", "vnfs" : { |