use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy in project so by onap.
the class ServiceInstanceWrapperTest method buildServiceProxy.
private ServiceProxy buildServiceProxy() {
ServiceProxy sp = new ServiceProxy();
sp.setId("sp-001");
sp.setType("transport");
return sp;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy 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.bbobjects.ServiceProxy in project so by onap.
the class BuildingBlockTestDataSetup method buildServiceProxy.
public ServiceProxy buildServiceProxy() {
serviceProxyCounter++;
ServiceProxy serviceProxy = new ServiceProxy();
serviceProxy.setServiceInstance(buildServiceInstance());
serviceProxy.getServiceInstance().getVnfs().add(buildGenericVnf());
Pnf primaryPnf = buildPnf();
primaryPnf.setRole("Primary");
serviceProxy.getServiceInstance().getPnfs().add(primaryPnf);
Pnf secondaryPnf = buildPnf();
secondaryPnf.setRole("Secondary");
serviceProxy.getServiceInstance().getPnfs().add(secondaryPnf);
return serviceProxy;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy in project so by onap.
the class BBInputSetup method getServiceProxy.
protected ServiceProxy getServiceProxy(Service service) {
if (!service.getServiceProxyCustomizations().isEmpty()) {
ServiceProxyResourceCustomization serviceProxyCatalog = getServiceProxyResourceCustomization(service);
ServiceProxy serviceProxy = new ServiceProxy();
serviceProxy.setModelInfoServiceProxy(mapperLayer.mapServiceProxyCustomizationToServiceProxy(serviceProxyCatalog));
Service sourceService = serviceProxyCatalog.getSourceService();
ServiceInstance sourceServiceShell = new ServiceInstance();
sourceServiceShell.setModelInfoServiceInstance(mapperLayer.mapCatalogServiceIntoServiceInstance(sourceService));
serviceProxy.setServiceInstance(sourceServiceShell);
serviceProxy.setType(sourceService.getServiceType());
return serviceProxy;
} else {
return null;
}
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy in project so by onap.
the class SniroHomingV2IT method beforeVpnBondingLink.
public void beforeVpnBondingLink(String id) {
VpnBondingLink bondingLink = new VpnBondingLink();
bondingLink.setVpnBondingLinkId("testVpnBondingId" + id);
bondingLink.getServiceProxies().add(setServiceProxy("1", "transport"));
ServiceProxy sp2 = setServiceProxy("2", "infrastructure");
Candidate requiredCandidate = new Candidate();
requiredCandidate.setIdentifierType(CandidateType.VNF_ID);
List<String> c = new ArrayList<String>();
c.add("testVnfId");
requiredCandidate.setIdentifiers(c);
sp2.addRequiredCandidates(requiredCandidate);
bondingLink.getServiceProxies().add(sp2);
serviceInstance.getVpnBondingLinks().add(bondingLink);
}
Aggregations