summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-04-04 17:31:43 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-04 17:31:43 +0000
commitf81920304c7b62637d32473e672a1e51275ce54b (patch)
tree35332de491929d0b278a4698f530f512ce28d46c /bpmn/MSOCommonBPMN/src
parent5f78643c42dd12588a1688f658ca6e134674ea29 (diff)
parent88c47a23b9428188ff5dd0b46941f8856465376b (diff)
Merge "PNF WF post instantiation configuration"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnf.java30
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnfTest.java54
3 files changed, 66 insertions, 22 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
index 0b2ef928ad..7a967d3159 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
@@ -128,9 +128,9 @@ public class AbstractCDSProcessingBBUtils implements CDSProcessingListener {
ExecutionServiceInput executionServiceInput = (ExecutionServiceInput) execution
.getVariable("executionServiceInput");
- CDSProcessingListener cdsProcessingListener = new AbstractCDSProcessingBBUtils();
+ //CDSProcessingListener cdsProcessingListener = new AbstractCDSProcessingBBUtils();
- CDSProcessingClient cdsClient = new CDSProcessingClient(cdsProcessingListener);
+ CDSProcessingClient cdsClient = new CDSProcessingClient(this);
CountDownLatch countDownLatch = cdsClient.sendRequest(executionServiceInput);
try {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnf.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnf.java
index b8fb5b96bd..6fadc7b55c 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnf.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnf.java
@@ -9,6 +9,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
"service-instance-id",
"pnf-id",
"pnf-name",
+"pnf-ipv4-address",
+"pnf-ipv6-address",
"service-model-uuid",
"pnf-customization-uuid"
})
@@ -24,6 +26,15 @@ public class ConfigDeployPropertiesForPnf {
@JsonProperty("pnf-name")
private String pnfName;
+ /**
+ * Config Deploy require IP address of PNF.
+ */
+ @JsonProperty("pnf-ipv4-address")
+ private String pnfIpV4Address;
+
+ @JsonProperty("pnf-ipv6-address")
+ private String pnfIpV6Address;
+
@JsonProperty("service-model-uuid")
private String serviceModelUuid;
@@ -70,6 +81,23 @@ public class ConfigDeployPropertiesForPnf {
this.pnfCustomizationUuid = pnfCustomizationUuid;
}
+ public String getPnfIpV4Address() {
+ return pnfIpV4Address;
+ }
+
+ public void setPnfIpV4Address(String pnfIpV4Address) {
+ this.pnfIpV4Address = pnfIpV4Address;
+ }
+
+ public String getPnfIpV6Address() {
+ return pnfIpV6Address;
+ }
+
+ public void setPnfIpV6Address(String pnfIpV6Address) {
+ this.pnfIpV6Address = pnfIpV6Address;
+ }
+
+
@Override
public String toString() {
@@ -77,6 +105,8 @@ public class ConfigDeployPropertiesForPnf {
sb.append("\"service-instance-id\":").append("\"").append(serviceInstanceId).append("\"");
sb.append(", \"pnf-id\":").append("\"").append(pnfId).append("\"");
sb.append(", \"pnf-name\":").append("\"").append(pnfName).append("\"");
+ sb.append(", \"pnf-ipv4-address\":").append("\"").append(pnfIpV4Address).append("\"");
+ sb.append(", \"pnf-ipv6-address\":").append("\"").append(pnfIpV6Address).append("\"");
sb.append(", \"service-model-uuid\":").append("\"").append(serviceModelUuid).append("\"");
sb.append(", \"pnf-customization-uuid\":").append("\"").append(pnfCustomizationUuid).append("\"");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnfTest.java
index 1d771c86d5..8e16ce6337 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/beans/ConfigDeployPropertiesForPnfTest.java
@@ -3,45 +3,59 @@ package org.onap.so.client.cds.beans;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import org.junit.Before;
import org.junit.Test;
public class ConfigDeployPropertiesForPnfTest {
+
ConfigDeployPropertiesForPnf configDeployPropertiesForPnf = new ConfigDeployPropertiesForPnf();
- private String serviceInstanceId;
- private String pnfId;
- private String pnfName;
- private String serviceModelUuid;
- private String pnfCustomizationUuid;
+ private static final String TEST_SERVICE_MODEL_UUID = "service-model-uuid";
+ private static final String TEST_PNF_CUSTOMIZATION_UUID = "pnf-customization-uuid";
+ private static final String TEST_PNF_ID = "pnf-id";
+ private static final String TEST_PNF_NAME = "pnf-name";
+ private static final String TEST_PNF_IP_V4_ADDRESS = "1.1.1.1";
+ private static final String TEST_PNF_IP_V6_ADDRESS = "::/128";
+ private static final String TEST_SERVICE_INSTANCE_ID = "service-instance-id";
+
+ @Before
+ public void setUp(){
+ configDeployPropertiesForPnf.setServiceInstanceId(TEST_SERVICE_INSTANCE_ID);
+ configDeployPropertiesForPnf.setServiceModelUuid(TEST_SERVICE_MODEL_UUID);
+ configDeployPropertiesForPnf.setPnfCustomizationUuid(TEST_PNF_CUSTOMIZATION_UUID);
+ configDeployPropertiesForPnf.setPnfId(TEST_PNF_ID);
+ configDeployPropertiesForPnf.setPnfName(TEST_PNF_NAME);
+ configDeployPropertiesForPnf.setPnfIpV4Address(TEST_PNF_IP_V4_ADDRESS);
+ configDeployPropertiesForPnf.setPnfIpV6Address(TEST_PNF_IP_V6_ADDRESS);
+ }
@Test
public final void testConfigDeployPropertiesForPnfTest() {
- configDeployPropertiesForPnf.setServiceInstanceId("service-instance-id");
- configDeployPropertiesForPnf.setServiceModelUuid("service-model-uuid");
- configDeployPropertiesForPnf.setPnfCustomizationUuid("pnf-customization-uuid");
- configDeployPropertiesForPnf.setPnfId("pnf-id");
- configDeployPropertiesForPnf.setPnfName("pnf-name");
assertNotNull(configDeployPropertiesForPnf.getServiceInstanceId());
assertNotNull(configDeployPropertiesForPnf.getServiceModelUuid());
assertNotNull(configDeployPropertiesForPnf.getPnfCustomizationUuid());
assertNotNull(configDeployPropertiesForPnf.getPnfId());
assertNotNull(configDeployPropertiesForPnf.getPnfName());
- assertEquals("service-instance-id", configDeployPropertiesForPnf.getServiceInstanceId());
- assertEquals("service-model-uuid", configDeployPropertiesForPnf.getServiceModelUuid());
- assertEquals("pnf-customization-uuid", configDeployPropertiesForPnf.getPnfCustomizationUuid());
- assertEquals("pnf-id", configDeployPropertiesForPnf.getPnfId());
- assertEquals("pnf-name", configDeployPropertiesForPnf.getPnfName());
+ assertEquals(TEST_SERVICE_INSTANCE_ID, configDeployPropertiesForPnf.getServiceInstanceId());
+ assertEquals(TEST_SERVICE_MODEL_UUID, configDeployPropertiesForPnf.getServiceModelUuid());
+ assertEquals(TEST_PNF_CUSTOMIZATION_UUID, configDeployPropertiesForPnf.getPnfCustomizationUuid());
+ assertEquals(TEST_PNF_ID, configDeployPropertiesForPnf.getPnfId());
+ assertEquals(TEST_PNF_NAME, configDeployPropertiesForPnf.getPnfName());
+ assertEquals(TEST_PNF_IP_V4_ADDRESS, configDeployPropertiesForPnf.getPnfIpV4Address());
+ assertEquals(TEST_PNF_IP_V6_ADDRESS, configDeployPropertiesForPnf.getPnfIpV6Address());
}
@Test
public void testtoString() {
final StringBuilder sb = new StringBuilder("{");
- sb.append("\"service-instance-id\":").append("\"").append(serviceInstanceId).append("\"");
- sb.append(", \"pnf-id\":").append("\"").append(pnfId).append("\"");
- sb.append(", \"pnf-name\":").append("\"").append(pnfName).append("\"");
- sb.append(", \"service-model-uuid\":").append("\"").append(serviceModelUuid).append("\"");
- sb.append(", \"pnf-customization-uuid\":").append("\"").append(pnfCustomizationUuid).append("\"");
+ sb.append("\"service-instance-id\":").append("\"").append(TEST_SERVICE_INSTANCE_ID).append("\"");
+ sb.append(", \"pnf-id\":").append("\"").append(TEST_PNF_ID).append("\"");
+ sb.append(", \"pnf-name\":").append("\"").append(TEST_PNF_NAME).append("\"");
+ sb.append(", \"pnf-ipv4-address\":").append("\"").append(TEST_PNF_IP_V4_ADDRESS).append("\"");
+ sb.append(", \"pnf-ipv6-address\":").append("\"").append(TEST_PNF_IP_V6_ADDRESS).append("\"");
+ sb.append(", \"service-model-uuid\":").append("\"").append(TEST_SERVICE_MODEL_UUID).append("\"");
+ sb.append(", \"pnf-customization-uuid\":").append("\"").append(TEST_PNF_CUSTOMIZATION_UUID).append("\"");
sb.append('}');
String Expexted = sb.toString();
assertEquals(Expexted, configDeployPropertiesForPnf.toString());