Search in sources :

Example 36 with MsoRequest

use of org.onap.so.entity.MsoRequest in project so by onap.

the class MSONetworkAdapterImplTest method deleteNetworkDeleteStackException.

@Test
public void deleteNetworkDeleteStackException() throws IOException, NetworkException {
    exception.expect(OpenStackResponseException.class);
    mockOpenStackResponseAccess(wireMockServer, wireMockPort);
    mockOpenStackGetStackDeleteOrUpdateComplete_200(wireMockServer, "OpenstackResponse_Stack_DeleteComplete.json");
    mockOpenStackDeleteStack_500(wireMockServer);
    mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
    MsoRequest request = new MsoRequest();
    request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7");
    request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0");
    impl.deleteNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, "43173f6a-d699-414b-888f-ab243dda6dfe", request);
}
Also used : MsoRequest(org.onap.so.entity.MsoRequest) Test(org.junit.Test)

Example 37 with MsoRequest

use of org.onap.so.entity.MsoRequest in project so by onap.

the class MSONetworkAdapterImplTest method updateNetworkHeatStackNotFound.

@Test
public void updateNetworkHeatStackNotFound() throws IOException, NetworkException {
    exception.expect(NetworkException.class);
    mockOpenStackResponseAccess(wireMockServer, wireMockPort);
    mockOpenStackGetStack_404(wireMockServer, NETWORK_NAME);
    MsoRequest request = new MsoRequest();
    request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7");
    request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0");
    Holder<String> stackId = new Holder<String>();
    impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId);
}
Also used : Holder(javax.xml.ws.Holder) MsoRequest(org.onap.so.entity.MsoRequest) Test(org.junit.Test)

Example 38 with MsoRequest

use of org.onap.so.entity.MsoRequest in project so by onap.

the class MSONetworkAdapterImplTest method createNetworkByModelNameAlreadyExistHeatModeFailIfExistTrue.

@Test
public void createNetworkByModelNameAlreadyExistHeatModeFailIfExistTrue() throws IOException, NetworkException {
    exception.expect(NetworkException.class);
    mockOpenStackResponseAccess(wireMockServer, wireMockPort);
    mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "dvspg-VCE_VPE-mtjnj40avbc");
    MsoRequest request = new MsoRequest();
    request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0");
    request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET");
    Holder<String> stackId = new Holder<String>();
    impl.createNetwork("mtn13", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, "dvspg-VCE_VPE-mtjnj40avbc", "dvs-mtjnj-01", null, null, null, null, true, false, null, null, null, request, stackId, new MutableBoolean());
}
Also used : Holder(javax.xml.ws.Holder) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) MsoRequest(org.onap.so.entity.MsoRequest) Test(org.junit.Test)

Example 39 with MsoRequest

use of org.onap.so.entity.MsoRequest in project so by onap.

the class MSONetworkAdapterImplTest method deleteNetworkError.

@Test
public void deleteNetworkError() throws IOException, NetworkException {
    exception.expect(NetworkException.class);
    mockOpenStackResponseAccess(wireMockServer, wireMockPort);
    mockOpenStackGetStackDeleteOrUpdateComplete_200(wireMockServer, "OpenstackResponse_Stack_DeleteComplete.json");
    mockOpenStackDeleteStack_200(wireMockServer);
    mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
    MsoRequest request = new MsoRequest();
    request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7");
    request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0");
    impl.deleteNetwork("", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, "43173f6a-d699-414b-888f-ab243dda6dfe", request);
}
Also used : MsoRequest(org.onap.so.entity.MsoRequest) Test(org.junit.Test)

Example 40 with MsoRequest

use of org.onap.so.entity.MsoRequest in project so by onap.

the class MSONetworkAdapterImplTest method updateNetworkHeatQueryException.

@Test
public void updateNetworkHeatQueryException() throws IOException, NetworkException {
    exception.expect(NetworkException.class);
    mockOpenStackResponseAccess(wireMockServer, wireMockPort);
    mockOpenStackGetStack_500(wireMockServer, NETWORK_NAME);
    MsoRequest request = new MsoRequest();
    request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7");
    request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0");
    Holder<String> stackId = new Holder<String>();
    impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId);
}
Also used : Holder(javax.xml.ws.Holder) MsoRequest(org.onap.so.entity.MsoRequest) Test(org.junit.Test)

Aggregations

MsoRequest (org.onap.so.entity.MsoRequest)51 Test (org.junit.Test)44 HashMap (java.util.HashMap)25 Map (java.util.Map)11 Holder (javax.xml.ws.Holder)11 VnfRollback (org.onap.so.openstack.beans.VnfRollback)9 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)6 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)6 MutableBoolean (org.apache.commons.lang3.mutable.MutableBoolean)5 CloudRegion (org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion)5 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)4 VfModuleCustomization (org.onap.so.db.catalog.beans.VfModuleCustomization)4 ArrayList (java.util.ArrayList)3 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)3 HostRoute (org.onap.so.bpmn.servicedecomposition.bbobjects.HostRoute)3 Subnet (org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet)3 VolumeGroup (org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup)3 OrchestrationContext (org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext)3 ModelInfoNetwork (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork)3 CreateNetworkRequest (org.onap.so.adapters.nwrest.CreateNetworkRequest)2