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; }
ServiceFunctionPath serviceFunctionPath = SfcProviderServicePathAPI.readServiceFunctionPath(pathName); sfpBuilder.setName(pathName).setServiceChainName(sfcName); serviceFunctionPath = sfpBuilder.build(); ret = SfcProviderServicePathAPI.putServiceFunctionPath(serviceFunctionPath); if (!ret) { LOG.error("Failed to create ServiceFunctionPath: {}", pathName);
public static Acl getServiceFunctionAcl(SfpName sfPathName) { ServiceFunctionPath serviceFunctionPath = SfcProviderServicePathAPI.readServiceFunctionPath(sfPathName); String classifierName = serviceFunctionPath.getClassifier(); Acl acl = null; if (classifierName != null) { ServiceFunctionClassifier classifier = SfcProviderServiceClassifierAPI.readServiceClassifier(classifierName); if (classifier != null && classifier.getAcl() != null) { acl = SfcProviderAclAPI.readAccessList(classifier.getAcl().getName(), classifier.getAcl().getType()); } } return acl; } }
.addRenderedPathToServicePathState(createdServiceFunctionPath.getName(), renderedServicePath.getName()))) { SfcProviderServiceFunctionAPI .deleteServicePathFromServiceFunctionState(createdServiceFunctionPath.getName());
.readServiceFunctionPath(new SfpName(createRenderedPathInput.getParentServiceFunctionPath()));
if (!(addRevPathToSfStateSuccessful && SfcProviderServicePathAPI.addRenderedPathToServicePathState( renderedServicePath.getParentServiceFunctionPath(), revRenderedServicePath.getName()))) {
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; }
private ServiceFunctionPath getSfcPath(SfcName chainName) { ServiceFunctionPaths paths = SfcProviderServicePathAPI.readAllServiceFunctionPaths(); for (ServiceFunctionPath path : paths.getServiceFunctionPath()) { if (path.getServiceChainName().equals(chainName)) { return path; } } return null; }
public static ServiceFunctionPath getSfcPath(SfcName chainName) { ServiceFunctionPaths paths = SfcProviderServicePathAPI.readAllServiceFunctionPaths(); if (paths != null) { for (ServiceFunctionPath path : paths.getServiceFunctionPath()) { if (path.getServiceChainName().equals(chainName)) { return path; } } } return null; }
private void getSfcChain() { ParameterValue pv = getChainNameParameter(actionInstance.getParameterValue()); if (pv == null) return; LOG.trace("Invoking RPC for chain {}", pv.getStringValue()); SfcName chainName=new SfcName(pv.getStringValue()); ServiceFunctionChain chain = SfcProviderServiceChainAPI.readServiceFunctionChain(chainName); ServiceFunctionPaths paths = SfcProviderServicePathAPI.readAllServiceFunctionPaths(); for(ServiceFunctionPath path: paths.getServiceFunctionPath()) { if(path.getServiceChainName().equals(chainName)) { LOG.info("Found path {} for chain {}",path.getName(),path.getServiceChainName()); } } } }