Search in sources :

Example 1 with Ipv6EroBackupCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCase in project bgpcep by opendaylight.

the class Ipv6EroParser method parseIpv6EroBackupCase.

public static Ipv6EroBackupCase parseIpv6EroBackupCase(final ByteBuf buffer) {
    final Ipv6EroBackupBuilder builder = new Ipv6EroBackupBuilder();
    final BitArray flags = BitArray.valueOf(buffer, Ipv4EroParser.FLAGS_SIZE);
    builder.setLoose(flags.get(Ipv4EroParser.LOOSE));
    buffer.skipBytes(Ipv4EroParser.RESERVED_ERO);
    builder.setAddress(Ipv6Util.addressForByteBuf(buffer));
    return new Ipv6EroBackupCaseBuilder().setIpv6EroBackup(builder.build()).build();
}
Also used : Ipv6EroBackupBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.ipv6.ero.backup._case.Ipv6EroBackupBuilder) BitArray(org.opendaylight.protocol.util.BitArray) Ipv6EroBackupCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCaseBuilder)

Example 2 with Ipv6EroBackupCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCase in project bgpcep by opendaylight.

the class Ipv6BackupEro method serializeSubTlv.

@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
    checkArgument(bindingSubTlv instanceof Ipv6EroBackupCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
    final Ipv6EroBackup ipv6Backup = ((Ipv6EroBackupCase) bindingSubTlv).getIpv6EroBackup();
    TlvUtil.writeTLV(getType(), Ipv6EroParser.serializeIpv6EroCase(ipv6Backup.getLoose(), ipv6Backup.getAddress()), aggregator);
}
Also used : Ipv6EroBackup(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.ipv6.ero.backup._case.Ipv6EroBackup) Ipv6EroBackupCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCase)

Aggregations

BitArray (org.opendaylight.protocol.util.BitArray)1 Ipv6EroBackupCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCase)1 Ipv6EroBackupCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.Ipv6EroBackupCaseBuilder)1 Ipv6EroBackup (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.ipv6.ero.backup._case.Ipv6EroBackup)1 Ipv6EroBackupBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.ipv6.ero.backup._case.Ipv6EroBackupBuilder)1