use of org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate 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);
}
use of org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate in project so by onap.
the class SniroHomingV2 method getCandidates.
private List<org.onap.so.client.sniro.beans.Candidate> getCandidates(List<Candidate> candidates) {
List<org.onap.so.client.sniro.beans.Candidate> candidateList = new ArrayList<>();
if (!candidates.isEmpty()) {
for (Candidate c : candidates) {
org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate();
can.setIdentifierType(org.onap.so.client.sniro.beans.CandidateType.valueOf(c.getIdentifierType().name()));
can.setIdentifiers(c.getIdentifiers());
can.setCloudOwner(c.getCloudOwner());
candidateList.add(can);
}
}
return candidateList;
}
use of org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate in project so by onap.
the class OofHomingV2IT 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);
}
use of org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate in project so by onap.
the class SniroHomingV2IT method beforeServiceProxy.
public void beforeServiceProxy() {
ServiceProxy sp = setServiceProxy("1", "infrastructure");
Candidate filteringAttributes = new Candidate();
filteringAttributes.setIdentifierType(CandidateType.CLOUD_REGION_ID);
List<String> c = new ArrayList<String>();
c.add("testCloudRegionId");
filteringAttributes.setCloudOwner("att");
filteringAttributes.setIdentifiers(c);
sp.getFilteringAttributes().add(filteringAttributes);
serviceInstance.getServiceProxies().add(sp);
}
Aggregations