summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-05-07 22:53:42 +0200
committerDenes Nemeth <denes.nemeth@nokia.com>2018-05-07 23:00:23 +0200
commit8d392994c5c6867779158ed4a18113f92b0cf5e7 (patch)
treea8c4ea6cafd0ed61396d446a57415c2b98bbd968
parent7ad528140eb987b2a7d66453b13e820a2d782245 (diff)
Fix grant manager initialization
Change-Id: I3bacfd83caa05b4cdcb74edc787834d3e34e0873 Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java3
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java37
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java35
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java10
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java16
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java36
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java9
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java8
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java27
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java11
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java33
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java34
12 files changed, 241 insertions, 18 deletions
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java
index 014b7145..d2378853 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/LifecycleManagerForVfc.java
@@ -19,6 +19,7 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.GrantlessGrantManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcGrantManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -30,7 +31,7 @@ import org.springframework.stereotype.Component;
public class LifecycleManagerForVfc extends LifecycleManager {
@Autowired
- LifecycleManagerForVfc(CatalogManagerForVfc catalogManager, GrantlessGrantManager grantManager, CbamRestApiProviderForVfc restApiProvider, VfcExternalSystemInfoProvider vimInfoProvider, JobManagerForVfc jobManager, LifecycleChangeNotificationManagerForVfc notificationManager) {
+ LifecycleManagerForVfc(CatalogManagerForVfc catalogManager, VfcGrantManager grantManager, CbamRestApiProviderForVfc restApiProvider, VfcExternalSystemInfoProvider vimInfoProvider, JobManagerForVfc jobManager, LifecycleChangeNotificationManagerForVfc notificationManager) {
super(catalogManager, grantManager, restApiProvider, vimInfoProvider, jobManager, notificationManager);
}
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java
new file mode 100644
index 00000000..4fd5a022
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForSo.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.*;
+
+public class TestSelfRegistrationManagerForSo extends TestBase {
+ @Test
+ public void testBean() {
+ VfcNotificationSender vfcNotificationSender = Mockito.mock(VfcNotificationSender.class);
+ AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
+ SelfRegistrationManagerForSo selfRegistrationManagerForSo = new SelfRegistrationManagerForSo(aaiExternalSystemInfoProvider, msbApiProvider, cbamRestApiProviderForSo);
+ assertNotNull(selfRegistrationManagerForSo);
+ assertBean(SelfRegistrationManagerForSo.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java
new file mode 100644
index 00000000..aee54a97
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/TestSelfRegistrationManagerForVfc.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestSelfRegistrationManagerForVfc extends TestBase {
+ @Test
+ public void testBean() {
+ VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = Mockito.mock(VfcExternalSystemInfoProvider.class);
+ SelfRegistrationManagerForVfc selfRegistrationManagerForVfc = new SelfRegistrationManagerForVfc(vfcExternalSystemInfoProvider, msbApiProvider, cbamRestApiProviderForVfc);
+ assertNotNull(selfRegistrationManagerForVfc);
+ assertBean(SelfRegistrationManagerForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java
index 0b49b917..60256049 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java
@@ -16,6 +16,7 @@
package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc;
+import com.google.common.collect.Sets;
import org.junit.Before;
import org.junit.Test;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
@@ -96,4 +97,13 @@ public class TestVfcExternalSystemInfoProvider extends TestBase {
verify(logger).error("Unable to query VNFM from VF-C with myVnfmId identifier", expectedException);
}
}
+
+ /**
+ * The VNFM identifier is loaded from property files
+ */
+ @Test
+ public void testGetVnfms(){
+ setFieldWithPropertyAnnotation(vfcExternalSystemInfoProvider, "${vnfmId}", "myVnfmId");
+ assertEquals(Sets.newHashSet("myVnfmId"), vfcExternalSystemInfoProvider.getVnfms());
+ }
}
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
index 7a7955eb..dcc6e424 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForSo.java
@@ -16,8 +16,20 @@
package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
-import static org.junit.Assert.*;
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
-public class TestCbamRestApiProviderForSo {
+public class TestCbamRestApiProviderForSo extends TestBase{
+ @Test
+ public void testBean(){
+ CbamTokenProviderForSo cbamTokenProvider = Mockito.mock(CbamTokenProviderForSo.class);
+ AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
+ CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
+ CbamRestApiProviderForSo cbamRestApiProviderForSo = new CbamRestApiProviderForSo(cbamTokenProvider, aaiExternalSystemInfoProvider, cbamSecurityProvider);
+ TestCase.assertNotNull(cbamRestApiProviderForSo);
+ assertBean(CbamRestApiProviderForSo.class);
+ }
} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java
new file mode 100644
index 00000000..d762bd72
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProviderForVfc.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+
+
+public class TestCbamRestApiProviderForVfc extends TestBase{
+ @Test
+ public void testBean(){
+ CbamTokenProviderForVfc cbamTokenProvider = Mockito.mock(CbamTokenProviderForVfc.class);
+ VfcExternalSystemInfoProvider c = Mockito.mock(VfcExternalSystemInfoProvider.class);
+ CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
+ CbamRestApiProviderForVfc cbamRestApiProviderForVfc = new CbamRestApiProviderForVfc(cbamTokenProvider, c, cbamSecurityProvider);
+ TestCase.assertNotNull(cbamRestApiProviderForVfc);
+ assertBean(CbamRestApiProviderForVfc.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
index 4777d9fb..1135df98 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForSo.java
@@ -21,15 +21,14 @@ import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
public class TestCbamTokenProviderForSo extends TestBase {
@Test
public void testBean(){
- CbamTokenProviderForSo cbamTokenProvider = Mockito.mock(CbamTokenProviderForSo.class);
AAIExternalSystemInfoProvider aaiExternalSystemInfoProvider = Mockito.mock(AAIExternalSystemInfoProvider.class);
- CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
- CbamRestApiProviderForSo cbamRestApiProviderForSo = new CbamRestApiProviderForSo(cbamTokenProvider, aaiExternalSystemInfoProvider, cbamSecurityProvider);
- TestCase.assertNotNull(cbamRestApiProviderForSo);
- assertBean(CbamRestApiProviderForSo.class);
+ CbamTokenProviderForSo cbamTokenProviderForSo = new CbamTokenProviderForSo(aaiExternalSystemInfoProvider);
+ TestCase.assertNotNull(cbamTokenProviderForSo);
+ assertBean(CbamTokenProviderForSo.class);
}
} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
index 59712d72..edd54d03 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamTokenProviderForVfc.java
@@ -26,11 +26,9 @@ import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoP
public class TestCbamTokenProviderForVfc extends TestBase {
@Test
public void testBean(){
- CbamTokenProviderForVfc cbamTokenProvider = Mockito.mock(CbamTokenProviderForVfc.class);
VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = Mockito.mock(VfcExternalSystemInfoProvider.class);
- CbamSecurityProvider cbamSecurityProvider = Mockito.mock(CbamSecurityProvider.class);
- CbamRestApiProviderForVfc cbamRestApiProviderForVfc = new CbamRestApiProviderForVfc(cbamTokenProvider, vfcExternalSystemInfoProvider, cbamSecurityProvider);
- TestCase.assertNotNull(cbamRestApiProviderForSo);
- assertBean(CbamRestApiProviderForSo.class);
+ CbamTokenProviderForVfc cbamTokenProviderForVfc = new CbamTokenProviderForVfc(vfcExternalSystemInfoProvider);
+ TestCase.assertNotNull(cbamTokenProviderForVfc);
+ assertBean(CbamTokenProviderForVfc.class);
}
} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java
index 14e764c9..ae58af91 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManager.java
@@ -390,6 +390,7 @@ public class TestLifecycleManager extends TestBase {
/**
* test instantiation with backward compatibility test with Amsterdam release
* - the vim identifier is supplied as vimid with not camel case
+ * - the access info is supplied as accessinfo with not camel case
*/
@Test
public void testInstantiationNoVimId() throws Exception {
@@ -777,7 +778,33 @@ public class TestLifecycleManager extends TestBase {
assertEquals(0, actualInstantiationRequest.getAllValues().size());
//verify
verify(logger).error("VF-C did not send VIM identifier in grant response");
+ }
+
+ /**
+ * instantiation fails if VF-C does not send access info in grant response
+ */
+ @Test
+ public void testVfcFailsToSendAccessInfo() throws Exception {
+ VnfInstantiateRequest instantiationRequest = prepareInstantiationRequest(VimInfo.VimInfoTypeEnum.OPENSTACK_V2_INFO);
+ when(vnfApi.vnfsPost(createRequest.capture(), eq(NOKIA_LCM_API_VERSION))).thenReturn(buildObservable(vnfInfo));
+ additionalParam.setInstantiationLevel(INSTANTIATION_LEVEL);
+ when(vfcGrantManager.requestGrantForInstantiate(VNFM_ID, VNF_ID, VIM_ID, ONAP_CSAR_ID, INSTANTIATION_LEVEL, cbamVnfdContent, JOB_ID)).thenReturn(grantResponse);
+ grantResponse.setVimId(VIM_ID);
+ GrantVNFResponseVimAccessInfo accessInfo = new GrantVNFResponseVimAccessInfo();
+ accessInfo.setTenant(TENANT);
+ String caCert = new String(readAllBytes(Paths.get(TestVfcGrantManager.class.getResource("/unittests/localhost.cert.pem").toURI())));
+ vimInfo.setSslInsecure("false");
+ vimInfo.setSslCacert(caCert);
+ //grantResponse.setAccessInfo(accessInfo);
+ ArgumentCaptor<InstantiateVnfRequest> actualInstantiationRequest = ArgumentCaptor.forClass(InstantiateVnfRequest.class);
+ when(vnfApi.vnfsVnfInstanceIdInstantiatePost(eq(VNF_ID), actualInstantiationRequest.capture(), eq(NOKIA_LCM_API_VERSION))).thenReturn(buildObservable(instantiationOperationExecution));
+ //when
+ VnfInstantiateResponse response = lifecycleManager.createAndInstantiate(VNFM_ID, instantiationRequest, restResponse);
+ waitForJobToFinishInJobManager(finished);
+ assertEquals(0, actualInstantiationRequest.getAllValues().size());
+ //verify
+ verify(logger).error("VF-C did not send access info in grant response");
}
/**
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
index e245e58a..326476ef 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestLifecycleManagerForVfc.java
@@ -19,6 +19,7 @@ import org.junit.Test;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.AAIExternalSystemInfoProvider;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.GrantlessGrantManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcExternalSystemInfoProvider;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcGrantManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForSo;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification.LifecycleChangeNotificationManagerForVfc;
@@ -32,11 +33,11 @@ public class TestLifecycleManagerForVfc extends TestBase{
@Test
public void testBean(){
CatalogManagerForVfc catalogManager = mock(CatalogManagerForVfc.class);
- GrantlessGrantManager grantManager = mock(GrantlessGrantManager.class);
- VfcExternalSystemInfoProvider aaiExternalSystemInfoProvider = mock(VfcExternalSystemInfoProvider.class);
- JobManagerForVfc jobManagerForSo = mock(JobManagerForVfc.class);
- LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForSo = mock(LifecycleChangeNotificationManagerForVfc.class);
- LifecycleManagerForVfc lifecycleManagerForSo = new LifecycleManagerForVfc(catalogManager, grantManager, cbamRestApiProviderForVfc, aaiExternalSystemInfoProvider, jobManagerForSo, lifecycleChangeNotificationManagerForSo);
+ VfcGrantManager vfcGrantManager = mock(VfcGrantManager.class);
+ VfcExternalSystemInfoProvider vfcExternalSystemInfoProvider = mock(VfcExternalSystemInfoProvider.class);
+ JobManagerForVfc lifecycleManagerForVfc = mock(JobManagerForVfc.class);
+ LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForVfc = mock(LifecycleChangeNotificationManagerForVfc.class);
+ LifecycleManagerForVfc lifecycleManagerForSo = new LifecycleManagerForVfc(catalogManager, vfcGrantManager, cbamRestApiProviderForVfc, vfcExternalSystemInfoProvider, lifecycleManagerForVfc, lifecycleChangeNotificationManagerForVfc);
assertNotNull(lifecycleManagerForSo);
assertBean(LifecycleChangeNotificationManagerForVfc.class);
}
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java
new file mode 100644
index 00000000..3eff92cd
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForSo.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.notification.AAINotificationProcessor;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestLifecycleChangeNotificationManagerForSo extends TestBase {
+ @Test
+ public void testBean() {
+ AAINotificationProcessor aaiNotificationProcessor = Mockito.mock(AAINotificationProcessor.class);
+ LifecycleChangeNotificationManagerForSo lifecycleChangeNotificationManagerForSo = new LifecycleChangeNotificationManagerForSo(cbamRestApiProviderForSo, selfRegistrationManagerForSo, aaiNotificationProcessor);
+ assertNotNull(lifecycleChangeNotificationManagerForSo);
+ assertBean(LifecycleChangeNotificationManagerForSo.class);
+ }
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java
new file mode 100644
index 00000000..35a8fcee
--- /dev/null
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManagerForVfc.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2016-2017, Nokia Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.direct.notification.AAINotificationProcessor;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.vfc.VfcNotificationSender;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
+
+import static junit.framework.TestCase.assertNotNull;
+
+public class TestLifecycleChangeNotificationManagerForVfc extends TestBase {
+ @Test
+ public void testBean() {
+ VfcNotificationSender vfcNotificationSender = Mockito.mock(VfcNotificationSender.class);
+ LifecycleChangeNotificationManagerForVfc lifecycleChangeNotificationManagerForVfc = new LifecycleChangeNotificationManagerForVfc(cbamRestApiProviderForVfc, selfRegistrationManagerForVfc, vfcNotificationSender);
+ assertNotNull(lifecycleChangeNotificationManagerForVfc);
+ assertBean(LifecycleChangeNotificationManagerForVfc.class);
+ }
+} \ No newline at end of file