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);
}
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);
}
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());
}
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);
}
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);
}
Aggregations