use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation in project so by onap.
the class SDNCConfigurationResourcesTest method assignVnrConfigurationTest.
@Test
public void assignVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.assignVnrConfiguration(serviceInstance, requestContext, customer, vpnBondingLink.getVnrConfiguration(), vnf, "uuid", new URI("http://localhost"));
verify(MOCK_gcTopologyMapper).assignOrActivateVnrReqMapper(eq(SDNCSvcAction.ASSIGN), eq(GenericResourceApiRequestActionEnumeration.CREATEGENERICCONFIGURATIONINSTANCE), eq(serviceInstance), eq(requestContext), eq(customer), any(Configuration.class), any(GenericVnf.class), any(String.class), any(URI.class));
}
use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation in project so by onap.
the class SDNCConfigurationResourcesTest method unAssignVnrConfigurationTest.
@Test
public void unAssignVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.unAssignVnrConfiguration(serviceInstance, requestContext, vpnBondingLink.getVnrConfiguration(), "uuid", new URI("http://localhost"));
verify(MOCK_gcTopologyMapper).deactivateOrUnassignVnrReqMapper(eq(SDNCSvcAction.UNASSIGN), eq(serviceInstance), eq(requestContext), any(Configuration.class), any(String.class), any(URI.class));
}
use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation in project so by onap.
the class SDNCConfigurationResourcesTest method deactivateVnrConfigurationTest.
@Test
public void deactivateVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.deactivateVnrConfiguration(serviceInstance, requestContext, vpnBondingLink.getVnrConfiguration(), "uuid", new URI("http://localhost"));
verify(MOCK_gcTopologyMapper).deactivateOrUnassignVnrReqMapper(eq(SDNCSvcAction.DEACTIVATE), eq(serviceInstance), eq(requestContext), any(Configuration.class), any(String.class), any(URI.class));
}
use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation in project so by onap.
the class SDNCConfigurationResourcesTest method activateVnrConfigurationTest.
@Test
public void activateVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.activateVnrConfiguration(serviceInstance, requestContext, customer, vpnBondingLink.getVnrConfiguration(), vnf, "uuid", new URI("http://localhost"));
verify(MOCK_gcTopologyMapper).assignOrActivateVnrReqMapper(eq(SDNCSvcAction.ACTIVATE), eq(GenericResourceApiRequestActionEnumeration.CREATEGENERICCONFIGURATIONINSTANCE), eq(serviceInstance), eq(requestContext), eq(customer), any(Configuration.class), any(GenericVnf.class), any(String.class), any(URI.class));
}
use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation in project so by onap.
the class GCTopologyOperationRequestMapperTest method deactivateOrUnassignVnrReqMapperTest.
@Test
public void deactivateOrUnassignVnrReqMapperTest() throws URISyntaxException {
RequestContext requestContext = new RequestContext();
requestContext.setMsoRequestId("MsoRequestId");
ServiceInstance serviceInstance = new ServiceInstance();
serviceInstance.setServiceInstanceId("ServiceInstanceId");
Configuration Configuration = new Configuration();
Configuration.setConfigurationId("ConfigurationId");
Configuration.setConfigurationType("VLAN-NETWORK-RECEPTOR");
GenericResourceApiGcTopologyOperationInformation genericInfo = genObjMapper.deactivateOrUnassignVnrReqMapper(SDNCSvcAction.UNASSIGN, serviceInstance, requestContext, Configuration, "uuid", new URI("http://localhost"));
Assert.assertNotNull(genericInfo);
Assert.assertNotNull(genericInfo.getRequestInformation());
Assert.assertNotNull(genericInfo.getSdncRequestHeader());
Assert.assertNotNull(genericInfo.getClass());
Assert.assertNotNull(genericInfo.getServiceInformation());
Assert.assertEquals("ConfigurationId", genericInfo.getConfigurationInformation().getConfigurationId());
Assert.assertEquals("VLAN-NETWORK-RECEPTOR", genericInfo.getConfigurationInformation().getConfigurationType());
Assert.assertEquals("uuid", genericInfo.getSdncRequestHeader().getSvcRequestId());
Assert.assertEquals("http://localhost", genericInfo.getSdncRequestHeader().getSvcNotificationUrl());
Assert.assertEquals("MsoRequestId", genericInfo.getRequestInformation().getRequestId());
}
Aggregations