diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java | 1 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceinventory/ServiceInventoryService.java | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java b/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java index 7cd2287..b45647f 100644 --- a/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java +++ b/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java @@ -121,6 +121,7 @@ public class CheckDMaaPEventsManager { JsonNode serviceInstances = childserviceInstances.get("service-instance"); JsonNode serviceInstance = serviceInstances.get(0); serviceInstanceEvent.setId(serviceInstance.get("service-instance-id").asText()); + serviceInstanceEvent.setHref("service/" + serviceInstance.get("service-instance-id").asText()); serviceInstanceEvent.setState(serviceInstance.get("orchestration-status").asText()); if (action.equals("CREATE")) { if (logger.isDebugEnabled()) { diff --git a/src/main/java/org/onap/nbi/apis/serviceinventory/ServiceInventoryService.java b/src/main/java/org/onap/nbi/apis/serviceinventory/ServiceInventoryService.java index 0426226..4abc3e8 100644 --- a/src/main/java/org/onap/nbi/apis/serviceinventory/ServiceInventoryService.java +++ b/src/main/java/org/onap/nbi/apis/serviceinventory/ServiceInventoryService.java @@ -55,6 +55,8 @@ public class ServiceInventoryService { LinkedHashMap serviceInventoryResponse = (LinkedHashMap) getServiceInventoryJsonTransformer.transform(serviceResponse); addrelatedPartyIdIdandSpecName(serviceId, serviceInventoryResponse); + String href = "service/" + serviceId; + serviceInventoryResponse.put("href", href ); return serviceInventoryResponse; } else { throw new BackendFunctionalException(HttpStatus.NOT_FOUND, "no catalog service found", @@ -153,6 +155,8 @@ public class ServiceInventoryService { if (!CollectionUtils.isEmpty(serviceInstances)) { serviceInventoryResponse = findServiceInventoryJsonTransformer.transform(serviceInstances); for (LinkedHashMap serviceInventory : serviceInventoryResponse) { + String href = "service/" + serviceInventory.get("id"); + serviceInventory.put("href", href); LinkedHashMap party = (LinkedHashMap) serviceInventory.get("relatedParty"); party.put("id", customerId); } |