use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator in project bgpcep by opendaylight.
the class Ipv4PrefixSidParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof PrefixSidCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final PrefixSidCase prefix = (PrefixSidCase) bindingSubTlv;
final ByteBuf buffer = Unpooled.buffer();
SrPrefixAttributesParser.serializePrefixAttributes(prefix.getFlags(), prefix.getAlgorithm(), prefix.getSidLabelIndex(), buffer);
TlvUtil.writeTLV(getType(), buffer, aggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator in project bgpcep by opendaylight.
the class Ipv6EroParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof Ipv6EroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final Ipv6EroCase ipv6Ero = (Ipv6EroCase) bindingSubTlv;
TlvUtil.writeTLV(getType(), serializeIpv6EroCase(ipv6Ero.isLoose(), ipv6Ero.getAddress()), aggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator in project bgpcep by opendaylight.
the class Ipv6PrefixSidParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof Ipv6PrefixSidCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final Ipv6PrefixSidCase prefix = (Ipv6PrefixSidCase) bindingSubTlv;
final ByteBuf buffer = Unpooled.buffer();
Ipv6SrPrefixAttributesParser.serializePrefixAttributes(prefix.getAlgorithm(), buffer);
TlvUtil.writeTLV(getType(), buffer, aggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator in project bgpcep by opendaylight.
the class SimpleLabelRegistryTest method testParseLabel.
@Test
public void testParseLabel() throws RSVPParsingException {
final LabelType output = this.simpleLabelRegistry.parseLabel(this.ctype, this.input);
assertNotNull(output);
assertTrue(output instanceof MockLabel);
final ByteBuf aggregator = Unpooled.EMPTY_BUFFER;
this.simpleLabelRegistry.serializeLabel(false, false, output, aggregator);
Mockito.verify(this.labelSerializer).serializeLabel(false, false, output, aggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator in project bgpcep by opendaylight.
the class SimpleRSVPObjectRegistryTest method testParseRSVP.
@Test
public void testParseRSVP() throws RSVPParsingException {
final RsvpTeObject output = this.simpleRSVPObjectRegistry.parseRSPVTe(this.subObjectTypeOne, this.subObjectCTypeOne, this.input);
assertNotNull(output);
assertTrue(output instanceof SecondaryExplicitRouteObject);
final ByteBuf aggregator = Unpooled.EMPTY_BUFFER;
this.simpleRSVPObjectRegistry.serializeRSPVTe(output, aggregator);
Mockito.verify(this.rsvpTeObjectSerializer).serializeObject(output, aggregator);
}
Aggregations