use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCUnassignTasksTest method unassignServiceInstanceTest.
@Test
public void unassignServiceInstanceTest() throws Exception {
doReturn(new GenericResourceApiServiceOperationInformation()).when(sdncServiceInstanceResources).unassignServiceInstance(serviceInstance, customer, requestContext);
sdncUnassignTasks.unassignServiceInstance(execution);
verify(sdncServiceInstanceResources, times(1)).unassignServiceInstance(serviceInstance, customer, requestContext);
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.SERVICE, sdncRequest.getTopology());
}
use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCUnassignTasksTest method unassignNetworkTest.
@Test
public void unassignNetworkTest() throws Exception {
String cloudRegionSdnc = "AAIAIC25";
cloudRegion.setCloudRegionVersion("2.5");
execution.setVariable("cloudRegionSdnc", cloudRegionSdnc);
doReturn(new GenericResourceApiNetworkOperationInformation()).when(sdncNetworkResources).unassignNetwork(network, serviceInstance, customer, requestContext, cloudRegion);
assertNotEquals(cloudRegionSdnc, cloudRegion.getLcpCloudRegionId());
sdncUnassignTasks.unassignNetwork(execution);
verify(sdncNetworkResources, times(1)).unassignNetwork(network, serviceInstance, customer, requestContext, cloudRegion);
assertEquals(cloudRegionSdnc, cloudRegion.getLcpCloudRegionId());
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.NETWORK, sdncRequest.getTopology());
}
use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCUnassignTasksTest method unassignVnfTest.
@Test
public void unassignVnfTest() throws Exception {
doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).unassignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
sdncUnassignTasks.unassignVnf(execution);
verify(sdncVnfResources, times(1)).unassignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
}
use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCAssignTasksTest method assignVfModuleTest.
@Test
public void assignVfModuleTest() throws Exception {
doReturn(new GenericResourceApiVfModuleOperationInformation()).when(sdncVfModuleResources).assignVfModule(eq(vfModule), eq(volumeGroup), eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
sdncAssignTasks.assignVfModule(execution);
verify(sdncVfModuleResources, times(1)).assignVfModule(eq(vfModule), eq(volumeGroup), eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.VFMODULE, sdncRequest.getTopology());
}
use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCAssignTasksTest method assignVnfTest.
@Test
public void assignVnfTest() throws Exception {
doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).assignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class));
execution.setVariable("generalBuildingBlock", gBBInput);
sdncAssignTasks.assignVnf(execution);
verify(sdncVnfResources, times(1)).assignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class));
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
}
Aggregations