Search in sources :

Example 1 with OpaqueExtendedCommunity

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.opaque.extended.community._case.OpaqueExtendedCommunity in project bgpcep by opendaylight.

the class OpaqueEcHandler method serializeExtendedCommunity.

@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
    Preconditions.checkArgument(extendedCommunity instanceof OpaqueExtendedCommunityCase, "The extended community %s is not OpaqueExtendedCommunityCase type.", extendedCommunity);
    final OpaqueExtendedCommunity opaqueExtendedCommunity = ((OpaqueExtendedCommunityCase) extendedCommunity).getOpaqueExtendedCommunity();
    byteAggregator.writeBytes(opaqueExtendedCommunity.getValue());
}
Also used : AbstractOpaqueExtendedCommunity(org.opendaylight.protocol.bgp.parser.spi.extended.community.AbstractOpaqueExtendedCommunity) OpaqueExtendedCommunity(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.opaque.extended.community._case.OpaqueExtendedCommunity) OpaqueExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.OpaqueExtendedCommunityCase)

Aggregations

AbstractOpaqueExtendedCommunity (org.opendaylight.protocol.bgp.parser.spi.extended.community.AbstractOpaqueExtendedCommunity)1 OpaqueExtendedCommunityCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.OpaqueExtendedCommunityCase)1 OpaqueExtendedCommunity (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.opaque.extended.community._case.OpaqueExtendedCommunity)1