Search in sources :

Example 1 with ModelInfoServiceProxy

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy in project so by onap.

the class BuildingBlockTestDataSetup method setServiceProxy.

public ServiceProxy setServiceProxy(String uniqueIdentifier, String type) {
    ServiceProxy serviceProxy = new ServiceProxy();
    serviceProxy.setId("testProxyId" + uniqueIdentifier);
    serviceProxy.setType(type);
    ModelInfoServiceProxy modelInfo = new ModelInfoServiceProxy();
    modelInfo.setModelInvariantUuid("testProxyModelInvariantUuid" + uniqueIdentifier);
    modelInfo.setModelName("testProxyModelName" + uniqueIdentifier);
    modelInfo.setModelUuid("testProxyModelUuid" + uniqueIdentifier);
    modelInfo.setModelVersion("testProxyModelVersion" + uniqueIdentifier);
    modelInfo.setModelInstanceName("testProxyModelInstanceName" + uniqueIdentifier);
    serviceProxy.setModelInfoServiceProxy(modelInfo);
    return serviceProxy;
}
Also used : ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy)

Example 2 with ModelInfoServiceProxy

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy in project so by onap.

the class BBInputSetupMapperLayer method mapServiceProxyCustomizationToServiceProxy.

protected ModelInfoServiceProxy mapServiceProxyCustomizationToServiceProxy(ServiceProxyResourceCustomization serviceProxyCustomization) {
    ModelInfoServiceProxy modelInfoServiceProxy = modelMapper.map(serviceProxyCustomization.getSourceService(), ModelInfoServiceProxy.class);
    modelInfoServiceProxy.setModelInstanceName(serviceProxyCustomization.getModelInstanceName());
    return modelInfoServiceProxy;
}
Also used : ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy)

Example 3 with ModelInfoServiceProxy

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy in project so by onap.

the class BBInputSetupTest method testGetServiceProxy.

@Test
public void testGetServiceProxy() {
    ServiceProxy expected = new ServiceProxy();
    expected.setType("TRANSPORT");
    expected.setModelInfoServiceProxy(new ModelInfoServiceProxy());
    expected.getModelInfoServiceProxy().setModelUuid("modelUUID");
    expected.getModelInfoServiceProxy().setModelInstanceName("modelInstanceName");
    expected.setServiceInstance(new ServiceInstance());
    expected.getServiceInstance().setModelInfoServiceInstance(new ModelInfoServiceInstance());
    expected.getServiceInstance().getModelInfoServiceInstance().setModelUuid("modelUUID");
    expected.getServiceInstance().getModelInfoServiceInstance().setServiceType("TRANSPORT");
    Service service = new Service();
    ServiceProxyResourceCustomization serviceProxyCatalog = new ServiceProxyResourceCustomization();
    serviceProxyCatalog.setModelCustomizationUUID("modelCustomizationUUID");
    serviceProxyCatalog.setModelInstanceName("modelInstanceName");
    Service sourceService = new Service();
    sourceService.setModelUUID("modelUUID");
    sourceService.setServiceType("TRANSPORT");
    serviceProxyCatalog.setSourceService(sourceService);
    service.setServiceProxyCustomizations(new ArrayList<ServiceProxyResourceCustomization>());
    service.getServiceProxyCustomizations().add(serviceProxyCatalog);
    ServiceProxy actual = SPY_bbInputSetup.getServiceProxy(service);
    assertThat(actual, sameBeanAs(expected));
}
Also used : ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy) ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ServiceProxyResourceCustomization(org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization) ServiceInstance(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance) ModelInfoServiceInstance(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance) Service(org.onap.so.db.catalog.beans.Service) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy) ModelInfoServiceInstance(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance) Test(org.junit.Test)

Example 4 with ModelInfoServiceProxy

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy in project so by onap.

the class TestDataSetup method setServiceProxy.

public ServiceProxy setServiceProxy(String uniqueIdentifier, String type) {
    ServiceProxy serviceProxy = new ServiceProxy();
    serviceProxy.setId("testProxyId" + uniqueIdentifier);
    serviceProxy.setType(type);
    ModelInfoServiceProxy modelInfo = new ModelInfoServiceProxy();
    modelInfo.setModelInvariantUuid("testProxyModelInvariantUuid" + uniqueIdentifier);
    modelInfo.setModelName("testProxyModelName" + uniqueIdentifier);
    modelInfo.setModelUuid("testProxyModelUuid" + uniqueIdentifier);
    modelInfo.setModelVersion("testProxyModelVersion" + uniqueIdentifier);
    modelInfo.setModelInstanceName("testProxyInstanceName" + uniqueIdentifier);
    serviceProxy.setModelInfoServiceProxy(modelInfo);
    return serviceProxy;
}
Also used : ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy)

Aggregations

ModelInfoServiceProxy (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy)4 ServiceProxy (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy)3 Test (org.junit.Test)1 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)1 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)1 Service (org.onap.so.db.catalog.beans.Service)1 ServiceProxyResourceCustomization (org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization)1