use of org.onap.so.client.sdnc.beans.SDNCRequest in project so by onap.
the class SDNCAssignTasksTest method assignNetworkTest.
@Test
public void assignNetworkTest() throws Exception {
doReturn(new GenericResourceApiNetworkOperationInformation()).when(sdncNetworkResources).assignNetwork(network, serviceInstance, customer, requestContext, cloudRegion);
sdncAssignTasks.assignNetwork(execution);
verify(sdncNetworkResources, times(1)).assignNetwork(network, serviceInstance, customer, requestContext, cloudRegion);
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 SDNCActivateTaskTest method activateVnfTest.
@Test
public void activateVnfTest() throws Exception {
doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).activateVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
sdncActivateTasks.activateVnf(execution);
verify(sdncVnfResources, times(1)).activateVnf(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 SDNCDeactivateTaskTest method deactivateServiceInstanceTest.
@Test
public void deactivateServiceInstanceTest() throws Exception {
doReturn(new GenericResourceApiServiceOperationInformation()).when(sdncServiceInstanceResources).deactivateServiceInstance(serviceInstance, customer, requestContext);
sdncDeactivateTasks.deactivateServiceInstance(execution);
verify(sdncServiceInstanceResources, times(1)).deactivateServiceInstance(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 SDNCActivateTaskTest method activateVfModuleTest.
@Test
public void activateVfModuleTest() throws Exception {
doReturn(new GenericResourceApiVfModuleOperationInformation()).when(sdncVfModuleResources).activateVfModule(eq(vfModule), eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
sdncActivateTasks.activateVfModule(execution);
verify(sdncVfModuleResources, times(1)).activateVfModule(eq(vfModule), 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 SDNCActivateTaskTest method activateNetworkTest.
@Test
public void activateNetworkTest() throws Exception {
doReturn(new GenericResourceApiNetworkOperationInformation()).when(sdncNetworkResources).activateNetwork(isA(L3Network.class), isA(ServiceInstance.class), isA(Customer.class), isA(RequestContext.class), isA(CloudRegion.class));
sdncActivateTasks.activateNetwork(execution);
verify(sdncNetworkResources, times(1)).activateNetwork(network, serviceInstance, customer, requestContext, cloudRegion);
SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
assertEquals(SDNCTopology.NETWORK, sdncRequest.getTopology());
}
Aggregations