Search in sources :

Example 1 with GenericResourceApiGcrequestinputGcRequestInput

use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput in project so by onap.

the class GeneralTopologyObjectMapperTest method buildGcRequestInformationTest.

@Test
public void buildGcRequestInformationTest() {
    GenericVnf vnf = new GenericVnf();
    vnf.setVnfId("TestVnfId");
    GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = genObjMapper.buildGcRequestInformation(vnf, null);
    assertNotNull(gcRequestInput);
    assertEquals(vnf.getVnfId(), gcRequestInput.getVnfId());
    assertNull(gcRequestInput.getInputParameters());
}
Also used : GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) GenericResourceApiGcrequestinputGcRequestInput(org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput) Test(org.junit.Test)

Example 2 with GenericResourceApiGcrequestinputGcRequestInput

use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput in project so by onap.

the class GeneralTopologyObjectMapperTest method buildGcRequestInformationTest_withInputParams.

@Test
public void buildGcRequestInformationTest_withInputParams() {
    GenericVnf vnf = new GenericVnf();
    vnf.setVnfId("TestVnfId");
    GenericResourceApiParam genericResourceApiParam = new GenericResourceApiParam();
    genericResourceApiParam.addParamItem(new GenericResourceApiParamParam());
    GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = genObjMapper.buildGcRequestInformation(vnf, genericResourceApiParam);
    assertNotNull(gcRequestInput);
    assertEquals(vnf.getVnfId(), gcRequestInput.getVnfId());
    assertNotNull(gcRequestInput.getInputParameters());
}
Also used : GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) GenericResourceApiGcrequestinputGcRequestInput(org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput) GenericResourceApiParam(org.onap.sdnc.northbound.client.model.GenericResourceApiParam) GenericResourceApiParamParam(org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam) Test(org.junit.Test)

Example 3 with GenericResourceApiGcrequestinputGcRequestInput

use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput in project so by onap.

the class GCTopologyOperationRequestMapper method assignOrActivateVnrReqMapper.

public GenericResourceApiGcTopologyOperationInformation assignOrActivateVnrReqMapper(SDNCSvcAction svcAction, GenericResourceApiRequestActionEnumeration reqAction, ServiceInstance serviceInstance, RequestContext requestContext, Customer customer, Configuration vnrConfiguration, GenericVnf voiceVnf, String sdncReqId, URI callbackUri) {
    String msoRequestId = UUID.randomUUID().toString();
    if (requestContext != null && requestContext.getMsoRequestId() != null) {
        msoRequestId = requestContext.getMsoRequestId();
    }
    GenericResourceApiGcTopologyOperationInformation req = new GenericResourceApiGcTopologyOperationInformation();
    GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId, callbackUri.toString());
    GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, reqAction);
    GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, false);
    GenericResourceApiConfigurationinformationConfigurationInformation configurationInformation = generalTopologyObjectMapper.buildConfigurationInformation(vnrConfiguration, true);
    GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = generalTopologyObjectMapper.buildGcRequestInformation(voiceVnf, null);
    req.setRequestInformation(requestInformation);
    req.setSdncRequestHeader(sdncRequestHeader);
    req.setServiceInformation(serviceInformation);
    req.setConfigurationInformation(configurationInformation);
    req.setGcRequestInput(gcRequestInput);
    return req;
}
Also used : GenericResourceApiServiceinformationServiceInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation) GenericResourceApiSdncrequestheaderSdncRequestHeader(org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader) GenericResourceApiConfigurationinformationConfigurationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation) GenericResourceApiGcrequestinputGcRequestInput(org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput) GenericResourceApiRequestinformationRequestInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation) GenericResourceApiGcTopologyOperationInformation(org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation)

Example 4 with GenericResourceApiGcrequestinputGcRequestInput

use of org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput in project so by onap.

the class GeneralTopologyObjectMapper method buildGcRequestInformation.

/**
 * Build GcRequestInformation
 *
 * @param vnf
 * @param genericResourceApiParam
 * @return
 */
public GenericResourceApiGcrequestinputGcRequestInput buildGcRequestInformation(GenericVnf vnf, GenericResourceApiParam genericResourceApiParam) {
    GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = new GenericResourceApiGcrequestinputGcRequestInput();
    gcRequestInput.setVnfId(vnf.getVnfId());
    if (genericResourceApiParam != null) {
        gcRequestInput.setInputParameters(genericResourceApiParam);
    }
    return gcRequestInput;
}
Also used : GenericResourceApiGcrequestinputGcRequestInput(org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput)

Aggregations

GenericResourceApiGcrequestinputGcRequestInput (org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput)4 Test (org.junit.Test)2 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)2 GenericResourceApiConfigurationinformationConfigurationInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation)1 GenericResourceApiGcTopologyOperationInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation)1 GenericResourceApiParam (org.onap.sdnc.northbound.client.model.GenericResourceApiParam)1 GenericResourceApiParamParam (org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam)1 GenericResourceApiRequestinformationRequestInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation)1 GenericResourceApiSdncrequestheaderSdncRequestHeader (org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader)1 GenericResourceApiServiceinformationServiceInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation)1