Search in sources :

Example 1 with GenericResourceApiGcTopologyOperationInformation

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));
}
Also used : Configuration(org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation) URI(java.net.URI) Test(org.junit.Test)

Example 2 with GenericResourceApiGcTopologyOperationInformation

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));
}
Also used : Configuration(org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation) URI(java.net.URI) Test(org.junit.Test)

Example 3 with GenericResourceApiGcTopologyOperationInformation

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));
}
Also used : Configuration(org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation) URI(java.net.URI) Test(org.junit.Test)

Example 4 with GenericResourceApiGcTopologyOperationInformation

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));
}
Also used : Configuration(org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation) URI(java.net.URI) Test(org.junit.Test)

Example 5 with GenericResourceApiGcTopologyOperationInformation

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());
}
Also used : Configuration(org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation) ServiceInstance(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance) RequestContext(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext) URI(java.net.URI) Test(org.junit.Test)

Aggregations

GenericResourceApiGcTopologyOperationInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation)7 URI (java.net.URI)5 Test (org.junit.Test)5 Configuration (org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration)5 GenericResourceApiConfigurationinformationConfigurationInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation)2 GenericResourceApiRequestinformationRequestInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation)2 GenericResourceApiSdncrequestheaderSdncRequestHeader (org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader)2 GenericResourceApiServiceinformationServiceInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation)2 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)2 GenericResourceApiGcrequestinputGcRequestInput (org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput)1 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)1 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)1