public final class SfcProviderRenderedPathAPI extends Object
It is normally called from onDataChanged() through a executor service. We need to use an executor service because we can not operate on a datastore while on onDataChanged() context.
Modifier and Type | Method and Description |
---|---|
static RenderedServicePath |
createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath,
CreateRenderedPathInput createRenderedPathInput)
Creates a RSP and all the associated operational state based on the given
service function path.
|
static RenderedServicePath |
createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath,
CreateRenderedPathInput createRenderedPathInput,
SfcServiceFunctionSchedulerAPI possibleScheduler)
Creates a RSP and all the associated operational state based on the given
service function path and scheduler.
|
protected static RenderedServicePath |
createRenderedServicePathEntry(ServiceFunctionPath serviceFunctionPath,
CreateRenderedPathInput createRenderedPathInput,
SfcServiceFunctionSchedulerAPI scheduler)
Create a Rendered Path and all the associated operational state based on
the given rendered service path and scheduler.
|
protected static List<RenderedServicePathHop> |
createRenderedServicePathHopList(List<SfName> serviceFunctionNameList,
List<String> sfgNameList,
int startingServiceIndex)
Given a list of Service Functions, create a RenderedServicePath Hop List.
|
static RenderedServicePath |
createReverseRenderedServicePathEntry(RenderedServicePath renderedServicePath)
Creates a RSP that is mirror image of the given one.
|
static RenderedServicePath |
createSymmetricRenderedServicePathAndState(RenderedServicePath renderedServicePath)
Create a Symmetric Path and all the associated operational state based on
the given rendered service path.
|
static boolean |
deleteRenderedServicePath(RspName renderedServicePathName)
This method deletes a RSP from the datastore and frees the Path ID.
|
static boolean |
deleteRenderedServicePaths(List<RspName> servicePaths)
When a SFF is deleted directly we need to delete all associated SFPs.
|
static boolean |
deleteRenderedServicePathsAndStates(List<RspName> rspNames)
Delete a list of RSPs and associated states.
|
static RspName |
generateReversedPathName(RspName rspName)
Given the name of an RSP, return its reverse RSP name.
|
static RspName |
getReversedRspName(RspName rspName)
It returns the Symmetric RSP Name from a RspName if both exist.
|
static boolean |
isChainSymmetric(ServiceFunctionPath sfp,
RenderedServicePath rsp)
Determine if a Rendered Service Path should be Symmetric.
|
static RenderedServicePath |
readRenderedServicePath(RspName rspName)
This function reads a RSP from the datastore.
|
static RenderedServicePathFirstHop |
readRenderedServicePathFirstHop(RspName rspName)
This method provides all necessary information for a system to construct
a NSH header and associated overlay packet to target the first service
hop of a Rendered Service Path.
|
static RenderedServicePathFirstHop |
readRspFirstHopBySftList(Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType,
List<SftTypeName> serviceFunctionTypeList)
This method gets all necessary information for a system to construct a
NSH header and associated overlay packet to target the first service hop
of a Rendered Service Path by ServiceFunctionTypeIdentity list.
|
static boolean |
setSymmetricPathId(RenderedServicePath renderedServicePath,
long pathId)
This method gets all necessary information for a system to construct a
NSH header and associated overlay packet to target the first service hop
of a Rendered Service Path by ServiceFunctionTypeIdentity list.
|
public static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath, CreateRenderedPathInput createRenderedPathInput, @Nullable SfcServiceFunctionSchedulerAPI possibleScheduler)
createdServiceFunctionPath
- Service Function PathcreateRenderedPathInput
- CreateRenderedPathInput objectpossibleScheduler
- SfcServiceFunctionSchedulerAPI objectpublic static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath, CreateRenderedPathInput createRenderedPathInput)
createdServiceFunctionPath
- Service Function PathcreateRenderedPathInput
- CreateRenderedPathInput objectpublic static RenderedServicePath createSymmetricRenderedServicePathAndState(RenderedServicePath renderedServicePath)
renderedServicePath
- RSP Objectprotected static List<RenderedServicePathHop> createRenderedServicePathHopList(List<SfName> serviceFunctionNameList, List<String> sfgNameList, int startingServiceIndex)
serviceFunctionNameList
- List of ServiceFunctionssfgNameList
- List of ServiceFunctionGroupsstartingServiceIndex
- Starting indexRenderedServicePathHop
protected static RenderedServicePath createRenderedServicePathEntry(ServiceFunctionPath serviceFunctionPath, CreateRenderedPathInput createRenderedPathInput, SfcServiceFunctionSchedulerAPI scheduler)
serviceFunctionPath
- RSP ObjectcreateRenderedPathInput
- CreateRenderedPathInput objectscheduler
- SfcServiceFunctionSchedulerAPI objectpublic static RenderedServicePath createReverseRenderedServicePathEntry(RenderedServicePath renderedServicePath)
renderedServicePath
- RSP objectpublic static RspName generateReversedPathName(RspName rspName)
rspName
- the RSP namepublic static RspName getReversedRspName(RspName rspName)
rspName
- RspName object with the primary Rendered Service Path Namepublic static RenderedServicePath readRenderedServicePath(RspName rspName)
rspName
- RSP namepublic static boolean deleteRenderedServicePaths(List<RspName> servicePaths)
servicePaths
- SffServicePath objectpublic static boolean deleteRenderedServicePathsAndStates(List<RspName> rspNames)
rspNames
- the list of RSP names.public static boolean deleteRenderedServicePath(RspName renderedServicePathName)
renderedServicePathName
- RSP namepublic static RenderedServicePathFirstHop readRenderedServicePathFirstHop(RspName rspName)
rspName
- RSP namepublic static RenderedServicePathFirstHop readRspFirstHopBySftList(Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType, List<SftTypeName> serviceFunctionTypeList)
serviceFunctionSchedulerType
- schedulertype for the Service FunctionserviceFunctionTypeList
- ServiceFunctionTypeIdentity listpublic static boolean setSymmetricPathId(RenderedServicePath renderedServicePath, long pathId)
renderedServicePath
- RenderedServicePath ObjectpathId
- Symmetric Path Idpublic static boolean isChainSymmetric(ServiceFunctionPath sfp, RenderedServicePath rsp)
sfp
- - used to get the symmetric flagrsp
- - the RSP to iterate over the SFs in the hopsCopyright © 2017 OpenDaylight. All rights reserved.