public ServiceFunctionPath getSfp(String redirectSfc) { ServiceFunctionPath sfpFound = null; ServiceFunctionPaths sfps = SfcProviderServicePathAPI.readAllServiceFunctionPaths(); if (sfps != null) { for (ServiceFunctionPath sfp: sfps.getServiceFunctionPath()) { if (sfp.getServiceChainName().getValue().equalsIgnoreCase(redirectSfc)) { sfpFound = sfp; } } } return sfpFound; }
public ServiceFunctionPath getSfp(String sfcName) { ServiceFunctionPath sfpFound = null; ServiceFunctionPaths sfps = SfcProviderServicePathAPI.readAllServiceFunctionPaths(); if (sfps != null) { for (ServiceFunctionPath sfp: sfps.getServiceFunctionPath()) { if (sfp.getServiceChainName().getValue().equalsIgnoreCase(sfcName)) { sfpFound = sfp; } } } return sfpFound; }
public static ServiceFunctionPath buildServiceFunctionPath(ServiceFunctionChain sfc) { Preconditions.checkNotNull(sfc, "Service Function Chain must not be null"); ServiceFunctionPathBuilder sfpBuilder = new ServiceFunctionPathBuilder(); //Set the name sfpBuilder.setName(new SfpName(SFP_NAME_PREFIX + sfc.getName().getValue())); sfpBuilder.setSymmetric(sfc.isSymmetric()); //Set related SFC name sfpBuilder.setServiceChainName(sfc.getName()); return sfpBuilder.build(); }
node.put(_SERVICE_CHAIN_NAME, rsp.getServiceChainName().getValue());
public Ace getAce(RenderedServicePath rsp) { return getAce(rsp.getName().getValue(), rsp.getParentServiceFunctionPath().getValue(), rsp.getServiceChainName().getValue()); }
return null; sfcName = new SfcName(sfcName.getValue() + "-" + serviceTypeName); pathName = new SfpName(pathName.getValue() + "-" + serviceTypeName); SfcServiceFunctionBuilder sfcServiceFunctionBuilder = new SfcServiceFunctionBuilder();