summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authoreeginux <henry.xie@est.tech>2019-04-05 16:49:07 +0000
committereeginux <henry.xie@est.tech>2019-04-05 16:49:07 +0000
commitc0908b5a8acee321086286c0cf33c412caaae29c (patch)
tree569f888c01a63fc763f4d0ac8ce0fb9f6af0f34c /bpmn/so-bpmn-infrastructure-common
parent10ef4462e14cfc57a0d3b074569e9b209186d5f1 (diff)
Change to use OAM IPAddress
Change to use ipaddress-v4/6-oam for the config deploy Add more assertions to the integration test Issue-ID: SO-1506 Change-Id: I5ba45b055569f90f91308b6e9d4bd85a1d4e99fe Signed-off-by: eeginux <henry.xie@est.tech>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegate.java9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegateTest.java4
2 files changed, 9 insertions, 4 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegate.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegate.java
index 9b13be8e52..5fbed598e3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegate.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegate.java
@@ -95,8 +95,13 @@ public class PrepareConfigDeployDelegate extends PrepareCdsCallDelegate {
Optional<Pnf> pnfOptional = pnfManagement.getEntryFor(pnfName);
if ( pnfOptional.isPresent()){
Pnf pnf = pnfOptional.get();
- configDeployProperties.setPnfIpV4Address(pnf.getPnfIpv4Address());
- configDeployProperties.setPnfIpV6Address(pnf.getPnfIpv6Address());
+
+ /**
+ * PRH patches the AAI with oam address.
+ * Use ipaddress-v4-oam and ipaddress-v6-oam for the config deploy request.
+ */
+ configDeployProperties.setPnfIpV4Address(pnf.getIpaddressV4Oam());
+ configDeployProperties.setPnfIpV6Address(pnf.getIpaddressV6Oam());
} else {
exceptionUtil.buildAndThrowWorkflowException(delegateExecution, ERROR_CODE, "AAI entry for PNF: " + pnfName + " does not exist");
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegateTest.java
index 77b6d9ffdd..0964d2146b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegateTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PrepareConfigDeployDelegateTest.java
@@ -99,8 +99,8 @@ public class PrepareConfigDeployDelegateTest {
private void mockAai() throws IOException {
Pnf pnf = new Pnf();
- pnf.setPnfIpv4Address(TEST_IPV4_ADDRESS);
- pnf.setPnfIpv6Address(TEST_IPV6_ADDRESS);
+ pnf.setIpaddressV4Oam(TEST_IPV4_ADDRESS);
+ pnf.setIpaddressV6Oam(TEST_IPV6_ADDRESS);
when(pnfManagement.getEntryFor(TEST_PNF_CORRELATION_ID)).thenReturn(Optional.of(pnf));
}