From e4ada8c413ede55376a3e5adb24297aa3871cbbf Mon Sep 17 00:00:00 2001 From: "Leigh, Phillip (pl876u)" Date: Thu, 10 Jan 2019 11:49:57 -0500 Subject: BugFix in aaiCtxBuilder: set PNF UUID to pnd-id Issue-ID: LOG-764 Change-Id: I56aa96e69de5f4a5d763e4a9759c7f3c4887526c Signed-off-by: Leigh, Phillip (pl876u) --- src/main/java/org/onap/pomba/contextbuilder/aai/util/RestUtil.java | 4 +++- src/test/resources/junit/pnfSampleInput.json | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/util/RestUtil.java b/src/main/java/org/onap/pomba/contextbuilder/aai/util/RestUtil.java index b85c75e..09ade48 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/aai/util/RestUtil.java +++ b/src/main/java/org/onap/pomba/contextbuilder/aai/util/RestUtil.java @@ -494,6 +494,8 @@ public class RestUtil { //Add PNF info context.setPnfs(transformPNF(pnfLst_fromAAi)); + log.info("ModelContext body: {}", JsonUtils.toPrettyJsonString(context)); + return context; } @@ -509,7 +511,7 @@ public class RestUtil { for (PnfInstance pnf_from_aai : pnfLst_from_AAI) { PNF pnf = new PNF(); - pnf.setModelInvariantUUID(pnf_from_aai.getPnfId()); + pnf.setUuid(pnf_from_aai.getPnfId()); pnf.setName(pnf_from_aai.getPnfName()); pnf.setModelVersionID(pnf_from_aai.getModelVersionId()); pnf.setModelInvariantUUID(pnf_from_aai.getModelInvariantId()); diff --git a/src/test/resources/junit/pnfSampleInput.json b/src/test/resources/junit/pnfSampleInput.json index 44f4a2d..1d94737 100644 --- a/src/test/resources/junit/pnfSampleInput.json +++ b/src/test/resources/junit/pnfSampleInput.json @@ -12,10 +12,12 @@ "frame-id": "99888", "serial-number": "c44b872f6830498b88c4989d67b2a6b7", "status": "ACTIVE", + "nf-function": "nf-Function-123", "nf-role": "22222", "model-invariant-id": "12345", "model-version-id": "2123", "admin_state_up": true, + "resource-version": "28", "tenant_id": "c44b872f6830498b88c4989d67b2a6b7", "created_at": "2018-03-20T16:49:01Z", "provider:network_type": "vlan" -- cgit 1.2.3-korg