Search in sources :

Example 1 with ServiceProxy

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;
}
Also used : ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy)

Example 2 with ServiceProxy

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;
}
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 3 with 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;
}
Also used : ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ModelInfoServiceProxy(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy) Pnf(org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf)

Example 4 with 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;
    }
}
Also used : ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ServiceProxyResourceCustomization(org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization) Service(org.onap.so.db.catalog.beans.Service) ServiceInstance(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)

Example 5 with ServiceProxy

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);
}
Also used : Candidate(org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate) VpnBondingLink(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBondingLink) ServiceProxy(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy) ArrayList(java.util.ArrayList)

Aggregations

ServiceProxy (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy)18 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)8 VpnBondingLink (org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBondingLink)6 ModelInfoServiceProxy (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy)6 ArrayList (java.util.ArrayList)5 Test (org.junit.Test)4 AllottedResource (org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource)4 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)4 JSONObject (org.json.JSONObject)3 Candidate (org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate)3 Service (org.onap.so.db.catalog.beans.Service)3 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)2 L3Network (org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network)2 Pnf (org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf)2 SolutionInfo (org.onap.so.bpmn.servicedecomposition.homingobjects.SolutionInfo)2 ServiceProxyResourceCustomization (org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization)2 RelatedInstance (org.onap.so.serviceinstancebeans.RelatedInstance)2 File (java.io.File)1 JSONArray (org.json.JSONArray)1 AAIFluentTypeBuilder (org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder)1