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;
}
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;
}
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));
}
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;
}
Aggregations