summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2019-04-09 12:26:12 +0000
committerMichaelMorris <michael.morris@est.tech>2019-04-09 12:26:12 +0000
commitc6d3ec1230b2d68548587b28d4a9b02e9e96101f (patch)
treeb9a28221a8263549f9d56bc4fafbb7b93511c131 /adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java
parentb703daf9fb4bc0aeadba09e466c7456fc96667e4 (diff)
Added handling for OAM IP address
Change-Id: Iaae7f17517dc44767b73495e62549765edc4e343 Issue-ID: SO-1637 Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java')
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
index 0f203902c8..aa089e1348 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
@@ -38,6 +38,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import javax.inject.Inject;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.junit.Before;
@@ -49,6 +50,9 @@ import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.Relationship;
import org.onap.aai.domain.yang.Vserver;
import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiHelper;
+import org.onap.so.adapters.vnfmadapter.extclients.aai.OamIpAddressSource;
+import org.onap.so.adapters.vnfmadapter.extclients.aai.OamIpAddressSource.OamIpAddressType;
import org.onap.so.adapters.vnfmadapter.extclients.vim.model.AccessInfo;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
@@ -102,6 +106,9 @@ public class Sol003LcnControllerTest {
private Sol003LcnContoller controller;
private final Gson gson = new Gson();
+ @Inject
+ private AaiHelper aaiHelper;
+
@Before
public void setUp() throws Exception {
mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
@@ -269,6 +276,7 @@ public class Sol003LcnControllerTest {
private InlineResponse201 createVnfInstance() {
final InlineResponse201 vnfInstance = new InlineResponse201();
+ vnfInstance.setId("myTestVnfIdOnVnfm");
final InlineResponse201LinksSelf selfLink = new InlineResponse201LinksSelf();
selfLink.setHref("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
final InlineResponse201Links VnfInstancelinks = new InlineResponse201Links();
@@ -288,6 +296,10 @@ public class Sol003LcnControllerTest {
vimConnection.setAccessInfo(accessInfo);
vimConnectionInfo.add(vimConnection);
vnfInstance.setVimConnectionInfo(vimConnectionInfo);
+
+ final OamIpAddressSource oamIpAddressSource =
+ new OamIpAddressSource(OamIpAddressType.CONFIGURABLE_PROPERTY, "vnfIpAddress");
+ aaiHelper.setOamIpAddressSource("myTestVnfIdOnVnfm", oamIpAddressSource);
return vnfInstance;
}