Class PathIdUtil
java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.PathIdUtil
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PathId
static final org.opendaylight.yangtools.yang.common.Uint32
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathId
buildPathId
(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode routesCont, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathIdNii) Build Path Id.static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates
createNidKey
(org.opendaylight.yangtools.yang.common.QName routeQName, org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName> routeKeyTemplate, Object routeKeyValue, Optional<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild> maybePathIdLeaf) Build Route Key for supporting mp.static org.opendaylight.yangtools.yang.common.Uint32
extractPathId
(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode data, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathNii) Extract PathId from route change received.static PathId
readPathId
(io.netty.buffer.ByteBuf buffer) Reads Path Identifier (4 bytes) from buffer.static void
writePathId
(PathId pathId, io.netty.buffer.ByteBuf buffer) Writes path-id value into the buffer when the path-id is not null or does not equal to zero.
-
Field Details
-
NON_PATH_ID_VALUE
public static final org.opendaylight.yangtools.yang.common.Uint32 NON_PATH_ID_VALUE -
NON_PATH_ID
-
-
Method Details
-
writePathId
Writes path-id value into the buffer when the path-id is not null or does not equal to zero.- Parameters:
pathId
- The NLRI Path Identifier.buffer
- The ByteBuf where path-id value can be written.
-
readPathId
Reads Path Identifier (4 bytes) from buffer.- Parameters:
buffer
- Input buffer.- Returns:
- Decoded PathId.
-
extractPathId
public static org.opendaylight.yangtools.yang.common.Uint32 extractPathId(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode data, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathNii) Extract PathId from route change received.- Parameters:
data
- Data containing the path IdpathNii
- Path Id NodeIdentifier specific per each Rib support- Returns:
- The path identifier from data change
-
buildPathId
public static PathId buildPathId(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode routesCont, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathIdNii) Build Path Id.- Parameters:
routesCont
- route containerpathIdNii
- path Id node Identifier- Returns:
- PathId or null in case is not the container
-
createNidKey
public static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates createNidKey(org.opendaylight.yangtools.yang.common.QName routeQName, org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName> routeKeyTemplate, Object routeKeyValue, Optional<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild> maybePathIdLeaf) Build Route Key for supporting mp. Key is composed by 2 elements (route-key + path Id).- Parameters:
routeQName
- route QNamerouteKeyTemplate
- route key templaterouteKeyValue
- route key valuemaybePathIdLeaf
- path id container, it might me supported or not, in that case default 0 value will be assigned- Returns:
- Route Key Nid
-