import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationEvpnCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.evpn._case.DestinationEvpnBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType() instanceof DestinationEvpnCase) {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.evpn._case.DestinationEvpnBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(),
createRoutes(EVPN_ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(
createRoutes(EVPN_ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.evpn._case.DestinationEvpnBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
public void testAttributes1() throws BGPParsingException {
final ByteBuf buffer = Unpooled.buffer();
final Attributes att = new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(createReach()).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(createReach()).build())
.build();
this.parser.serializeAttribute(att, buffer);
Assert.assertArrayEquals(IncMultEthTagRParserTest.RESULT, ByteArray.getAllBytes(buffer));
public void testAttributes2() throws BGPParsingException {
final ByteBuf buffer = Unpooled.buffer();
final Attributes att = new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(createUnreach()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(createUnreach()).build())
.build();
this.parser.serializeAttribute(att, buffer);
Assert.assertArrayEquals(IncMultEthTagRParserTest.RESULT, ByteArray.getAllBytes(buffer));
.build();
return mpReachExpected.setWithdrawnRoutes(wd).build();
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.destination.group.ipv4.flowspec.flowspec.type.SourcePrefixCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
@Override
public final void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(routes), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(routes), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(),
createRoutes(this.routes), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(this.routes),
Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.l3vpn.destination.ipv4.DestinationFlowspecL3vpnIpv4Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
final ByteBuf buffer = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build())
.build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RdTwoOctetAs;
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(
new FlowspecL3vpnIpv4RoutesBuilder().setFlowspecL3vpnRoute(Map.of(ROUTE.key(), ROUTE)).build()),
ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
final Update update = this.ribSupport.buildUpdate(createRoutes(
new FlowspecL3vpnIpv4RoutesBuilder().setFlowspecL3vpnRoute(Map.of(ROUTE.key(), ROUTE)).build()),
Collections.emptyList(), ATTRIBUTES);
- final AdvertizedRoutes advertised = update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ final AdvertizedRoutes advertised = update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes();
assertEquals(REACH_NLRI, advertised.getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.l3vpn.destination.ipv6.DestinationFlowspecL3vpnIpv6;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.l3vpn.destination.ipv6.DestinationFlowspecL3vpnIpv6Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv6AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv6AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RdTwoOctetAs;
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(
new FlowspecL3vpnIpv6RoutesBuilder()
.setFlowspecL3vpnRoute(Map.of(ROUTE.key(), ROUTE)).build()), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
new FlowspecL3vpnIpv6RoutesBuilder().setFlowspecL3vpnRoute(Map.of(ROUTE.key(), ROUTE)).build()),
Collections.emptyList(), ATTRIBUTES);
final AdvertizedRoutes advertised
- = update.getAttributes().augmentation(Attributes1.class).getMpReachNlri().getAdvertizedRoutes();
+ = update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri().getAdvertizedRoutes();
assertEquals(REACH_NLRI, advertised.getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
final ByteBuf buffer = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build())
.build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.destination.ipv6.DestinationFlowspecIpv6Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.ipv6.route.FlowspecRoute;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv6AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(mp.setAfi(Ipv6AddressFamily.class).build())
.build())
.build(), buffer);
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI, ByteArray.readAllBytes(buffer));
final ByteBuf buffer = Unpooled.buffer();
this.fsParser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mp.build()).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mp.build()).build())
.build(), buffer);
assertArrayEquals(UNREACHED_NLRI_ADD_PATH, ByteArray.readAllBytes(buffer));
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationIpv4Case;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationIpv4CaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes advertizedRoutes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (advertizedRoutes != null && advertizedRoutes.getDestinationType() instanceof DestinationIpv4Case) {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationIpv6Case;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationIpv6CaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes advertizedRoutes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (advertizedRoutes != null && advertizedRoutes.getDestinationType() instanceof DestinationIpv6Case) {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class)
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class)
.getMpReachNlri().getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.Segments;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.SegmentsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
.build())
.build());
- paBuilder.addAugmentation(new Attributes1Builder().setMpReachNlri(mpBuilder.build()).build());
- assertEquals(paBuilder.augmentation(Attributes1.class).getMpReachNlri(),
- attrs.augmentation(Attributes1.class).getMpReachNlri());
+ paBuilder.addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpBuilder.build()).build());
+ assertEquals(paBuilder.augmentation(AttributesReach.class).getMpReachNlri(),
+ attrs.augmentation(AttributesReach.class).getMpReachNlri());
paBuilder.setUnrecognizedAttributes(Collections.emptyMap());
// check API message
assertEquals(1, withdrawnRoutes.size());
final Attributes attributes = message.getAttributes();
assertNotNull(attributes);
- assertNull(attributes.augmentation(Attributes1.class));
- final Attributes2 attributes2 = attributes.augmentation(Attributes2.class);
- assertNotNull(attributes2);
- final MpUnreachNlri mpUnreachNlri = attributes2.getMpUnreachNlri();
+ assertNull(attributes.augmentation(AttributesReach.class));
+ final AttributesUnreach AttributesUnreach = attributes.augmentation(AttributesUnreach.class);
+ assertNotNull(AttributesUnreach);
+ final MpUnreachNlri mpUnreachNlri = AttributesUnreach.getMpUnreachNlri();
assertNotNull(mpUnreachNlri);
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
final Ipv4NlriParser serializer = new Ipv4NlriParser();
final ByteBuf output = Unpooled.buffer(MP_NLRI_BYTES.length);
final Attributes attributes = new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachNlri).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachNlri).build())
.build();
serializer.serializeAttribute(attributes, output);
Assert.assertArrayEquals(MP_NLRI_BYTES, output.array());
final Ipv4NlriParser serializer = new Ipv4NlriParser();
final ByteBuf output = Unpooled.buffer(MP_NLRI_BYTES.length);
final Attributes attributes = new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachNlri).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachNlri).build())
.build();
serializer.serializeAttribute(attributes, output);
Assert.assertArrayEquals(MP_NLRI_BYTES, output.array());
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.l3vpn.mcast.nlri;
import io.netty.buffer.ByteBuf;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv4WithdrawnCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv4WithdrawnCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType() instanceof DestinationL3vpnMcastIpv4AdvertizedCase) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.l3vpn.mcast.nlri;
import io.netty.buffer.ByteBuf;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv6WithdrawnCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv6WithdrawnCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType() instanceof DestinationL3vpnMcastIpv6AdvertizedCase) {
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
List<VpnDestination> vpnDst = null;
boolean isWithdrawnRoute = false;
if (pathAttributes1 != null) {
- final AdvertizedRoutes routes = (pathAttributes1.getMpReachNlri()).getAdvertizedRoutes();
+ final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null) {
vpnDst = getAdvertizedVpnDestination(routes.getDestinationType());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv4WithdrawnCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RdIpv4;
public void testBuildMpUnreachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MCAST_L3VPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), routes, ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MCAST_L3VPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(routes, Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationL3vpnMcastIpv6WithdrawnCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RdIpv4;
public void testBuildMpUnreachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MCAST_L3VPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), routes, ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MCAST_L3VPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(routes, Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStackBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
final ByteBuf output = Unpooled.buffer();
PARSER.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(REACH_NLRI, ByteArray.readAllBytes(output));
}
final ByteBuf output = Unpooled.buffer();
PARSER.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(UNREACH_NLRI, ByteArray.readAllBytes(output));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv4.rev180329.bgp.rib.rib.loc.rib.tables.routes.VpnIpv4RoutesCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv4.rev180329.bgp.rib.rib.loc.rib.tables.routes.VpnIpv4RoutesCaseBuilder;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStackBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
final ByteBuf output = Unpooled.buffer();
PARSER.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(REACH_NLRI, ByteArray.readAllBytes(output));
}
final ByteBuf output = Unpooled.buffer();
PARSER.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(UNREACH_NLRI, ByteArray.readAllBytes(output));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv6.rev180329.bgp.rib.rib.loc.rib.tables.routes.VpnIpv6RoutesCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv6.rev180329.bgp.rib.rib.loc.rib.tables.routes.VpnIpv6RoutesCaseBuilder;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationIpv6LabeledUnicastCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLabeledUnicastCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null) {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.labeled.unicast._case.DestinationLabeledUnicastBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(LU_REACH_NLRI_IPV4, ByteArray.readAllBytes(output));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(LU_REACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(LU_UNREACH_NLRI_IPV4, ByteArray.readAllBytes(output));
final ByteBuf output1 = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected1).build())
.build(), output1);
assertArrayEquals(LU_UNREACH_NLRI_IPV4, ByteArray.readAllBytes(output1));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(LU_UNREACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output));
final ByteBuf output1 = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected1).build())
.build(), output1);
assertArrayEquals(LU_UNREACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output1));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(LU_REACH_NLRI_IPV6, ByteArray.readAllBytes(output));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachExpected).build())
.build(), output);
assertArrayEquals(LU_REACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(LU_UNREACH_NLRI_IPV6, ByteArray.readAllBytes(output));
final ByteBuf output1 = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected1).build())
.build(), output1);
assertArrayEquals(LU_UNREACH_NLRI_IPV6, ByteArray.readAllBytes(output1));
}
//test serializer
final ByteBuf output = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected2).build())
.build(), output);
assertArrayEquals(LU_UNREACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output));
final ByteBuf output1 = Unpooled.buffer();
parser.serializeAttribute(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreachExpected1).build())
.build(), output1);
assertArrayEquals(LU_UNREACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output1));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationLinkstateCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
private static CLinkstateDestination getNlriType(final AttributesBuilder pab) {
- final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329
- .Attributes1 mpr = pab.augmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp
- .multiprotocol.rev180329.Attributes1.class);
+ final AttributesReach mpr = pab.augmentation(AttributesReach.class);
if (mpr != null && mpr.getMpReachNlri() != null) {
final DestinationType dt = mpr.getMpReachNlri().getAdvertizedRoutes().getDestinationType();
if (dt instanceof DestinationLinkstateCase) {
}
}
}
- final Attributes2 mpu = pab.augmentation(Attributes2.class);
+ final AttributesUnreach mpu = pab.augmentation(AttributesUnreach.class);
if (mpu != null && mpu.getMpUnreachNlri() != null) {
final DestinationType dt = mpu.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType();
if (dt instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLinkstateCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
serializeAdvertisedRoutes(pathAttributes1.getMpReachNlri().getAdvertizedRoutes(), byteAggregator);
} else if (pathAttributes2 != null) {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationLinkstateCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
}
private static AttributesBuilder createBuilder(final ObjectType type) {
- return new AttributesBuilder().addAugmentation(new Attributes1Builder()
+ return new AttributesBuilder().addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(new MpReachNlriBuilder()
.setAfi(LinkstateAddressFamily.class)
.setSafi(LinkstateSubsequentAddressFamily.class)
}
private static AttributesBuilder createUnreachBuilder(final ObjectType type) {
- return new AttributesBuilder().addAugmentation(new Attributes2Builder()
+ return new AttributesBuilder().addAugmentation(new AttributesUnreachBuilder()
.setMpUnreachNlri(new MpUnreachNlriBuilder()
.setAfi(LinkstateAddressFamily.class)
.setSafi(LinkstateSubsequentAddressFamily.class)
assertEquals(0, b.readableBytes());
builder = new AttributesBuilder();
- final Attributes1Builder builder1 = new Attributes1Builder();
+ final AttributesReachBuilder builder1 = new AttributesReachBuilder();
builder.addAugmentation(builder1.build());
this.parser.parseAttribute(b, builder, null);
assertEquals(0, b.readableBytes());
assertEquals(0, b.readableBytes());
builder = new AttributesBuilder();
- final Attributes2Builder builder2 = new Attributes2Builder();
+ final AttributesUnreachBuilder builder2 = new AttributesUnreachBuilder();
builder.addAugmentation(builder2.build());
this.parser.parseAttribute(b, builder, null);
assertEquals(0, b.readableBytes());
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
final AdvertizedRoutes aroutes = new AdvertizedRoutesBuilder().setDestinationType(dlc).build();
Attributes pa = new AttributesBuilder()
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(new MpReachNlriBuilder().setAdvertizedRoutes(aroutes).build())
.build())
.build();
final WithdrawnRoutes wroutes = new WithdrawnRoutesBuilder().setDestinationType(dlcU).build();
pa = new AttributesBuilder()
- .addAugmentation(new Attributes2Builder()
+ .addAugmentation(new AttributesUnreachBuilder()
.setMpUnreachNlri(new MpUnreachNlriBuilder().setWithdrawnRoutes(wroutes).build())
.build())
.build();
parser.serializeAttribute(pa, result);
assertArrayEquals(this.nodeNlri, ByteArray.getAllBytes(result));
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RdTwoOctetAs;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RouteDistinguisher;
@Test
public void testBuildMpUnreachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), createRoutes(ROUTES), ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class)
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class)
.getMpUnreachNlri().getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Update update = this.ribSupport.buildUpdate(createRoutes(ROUTES), Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class)
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class)
.getMpReachNlri().getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.AsPathBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.LocalPrefBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.OriginBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.CParameters1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.MultiprotocolCapability;
null);
final Class<? extends AddressFamily> afi = message.getAttributes()
- .augmentation(Attributes2.class).getMpUnreachNlri().getAfi();
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getAfi();
final Class<? extends SubsequentAddressFamily> safi = message.getAttributes()
- .augmentation(Attributes2.class).getMpUnreachNlri().getSafi();
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getSafi();
assertEquals(LinkstateAddressFamily.class, afi);
assertEquals(LinkstateSubsequentAddressFamily.class, safi);
clBuilder.setIdentifier(new Identifier(Uint64.ONE));
clBuilder.setProtocolId(ProtocolId.Ospf);
- final Attributes1Builder lsBuilder = new Attributes1Builder();
+ final AttributesReachBuilder lsBuilder = new AttributesReachBuilder();
final MpReachNlriBuilder mpBuilder = new MpReachNlriBuilder();
mpBuilder.setAfi(LinkstateAddressFamily.class);
mpBuilder.setSafi(LinkstateSubsequentAddressFamily.class);
paBuilder.setLocalPref(new LocalPrefBuilder().setPref(Uint32.valueOf(100)).build());
assertEquals(paBuilder.getLocalPref(), attrs.getLocalPref());
- final MpReachNlri mp = attrs.augmentation(Attributes1.class).getMpReachNlri();
+ final MpReachNlri mp = attrs.augmentation(AttributesReach.class).getMpReachNlri();
assertEquals(mpBuilder.getAfi(), mp.getAfi());
assertEquals(mpBuilder.getSafi(), mp.getSafi());
assertEquals(mpBuilder.getCNextHop(), mp.getCNextHop());
.setOspfRouterId(Uint32.valueOf(0x01010102L)).build()).build()).build());
linkstates.add(clBuilder.setObjectType(nCase.build()).build());
- final Attributes1Builder lsBuilder = new Attributes1Builder();
+ final AttributesReachBuilder lsBuilder = new AttributesReachBuilder();
final MpReachNlriBuilder mpBuilder = new MpReachNlriBuilder();
mpBuilder.setAfi(LinkstateAddressFamily.class);
mpBuilder.setSafi(LinkstateSubsequentAddressFamily.class);
paBuilder.addAugmentation(lsBuilder.build());
paBuilder.setUnrecognizedAttributes(Collections.emptyMap());
- final MpReachNlri mp = attrs.augmentation(Attributes1.class).getMpReachNlri();
+ final MpReachNlri mp = attrs.augmentation(AttributesReach.class).getMpReachNlri();
assertEquals(mpBuilder.getAfi(), mp.getAfi());
assertEquals(mpBuilder.getSafi(), mp.getSafi());
assertEquals(mpBuilder.getCNextHop(), mp.getCNextHop());
import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType() instanceof DestinationMvpnIpv4AdvertizedCase) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.mvpn.impl.nlri;
import io.netty.buffer.ByteBuf;
import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType() instanceof DestinationMvpnIpv6AdvertizedCase) {
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv4.rev180417.bgp.rib.rib.loc.rib.tables.routes.MvpnRoutesIpv4Case;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv4.rev180417.bgp.rib.rib.loc.rib.tables.routes.MvpnRoutesIpv4CaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv4.rev180417.mvpn.destination.MvpnDestination;
public void testBuildMpUnreachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MVPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), routes, ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MVPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(routes, Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv6.rev180417.bgp.rib.rib.loc.rib.tables.routes.MvpnRoutesIpv6Case;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv6.rev180417.bgp.rib.rib.loc.rib.tables.routes.MvpnRoutesIpv6CaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv6.rev180417.mvpn.destination.MvpnDestination;
public void testBuildMpUnreachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MVPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), routes, ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(MVPN_ROUTES);
final Update update = this.ribSupport.buildUpdate(routes, Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutes;
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
- final Attributes2 pathAttributes2 = pathAttributes.augmentation(Attributes2.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
+ final AttributesUnreach pathAttributes2 = pathAttributes.augmentation(AttributesUnreach.class);
if (pathAttributes1 != null) {
final AdvertizedRoutes routes = pathAttributes1.getMpReachNlri().getAdvertizedRoutes();
if (routes != null && routes.getDestinationType()
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.bgp.rib.rib.loc.rib.tables.routes.RouteTargetConstrainRoutesCase;
public void testBuildMpUnreachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(RT_ROUTES);
final Update update = this.ribSupport.buildUpdate(Collections.emptyList(), routes, ATTRIBUTES);
- assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(Attributes2.class).getMpUnreachNlri()
+ assertEquals(UNREACH_NLRI, update.getAttributes().augmentation(AttributesUnreach.class).getMpUnreachNlri()
.getWithdrawnRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes1.class));
+ assertNull(update.getAttributes().augmentation(AttributesReach.class));
}
@Test
public void testBuildMpReachNlriUpdate() {
final Collection<MapEntryNode> routes = createRoutes(RT_ROUTES);
final Update update = this.ribSupport.buildUpdate(routes, Collections.emptyList(), ATTRIBUTES);
- assertEquals(REACH_NLRI, update.getAttributes().augmentation(Attributes1.class).getMpReachNlri()
+ assertEquals(REACH_NLRI, update.getAttributes().augmentation(AttributesReach.class).getMpReachNlri()
.getAdvertizedRoutes().getDestinationType());
- assertNull(update.getAttributes().augmentation(Attributes2.class));
+ assertNull(update.getAttributes().augmentation(AttributesUnreach.class));
}
@Test
}
augment "/bgp-msg:update/bgp-msg:attributes" {
- ext:augment-identifier attributes-1;
+ ext:augment-identifier attributes-reach;
container mp-reach-nlri {
reference "http://tools.ietf.org/html/rfc4760#section-3";
}
augment "/bgp-msg:update/bgp-msg:attributes" {
- ext:augment-identifier attributes-2;
+ ext:augment-identifier attributes-unreach;
container mp-unreach-nlri {
reference "http://tools.ietf.org/html/rfc4760#section-4";
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.NlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.graceful.restart.capability.TablesKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
final MpReachNlri mpReachNlri = getMpReach(parsed);
if (mpReachNlri == null) {
// No MP_REACH attribute, just reuse MP_UNREACH if it is present.
- final Attributes2 attrs2 = parsed.augmentation(Attributes2.class);
+ final AttributesUnreach attrs2 = parsed.augmentation(AttributesUnreach.class);
if (attrs2 != null) {
builder.addAugmentation(attrs2);
}
return new BGPDocumentedException(withdrawCause);
});
- builder.addAugmentation(new Attributes2Builder().setMpUnreachNlri(converted).build());
+ builder.addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(converted).build());
return builder.build();
}
private static MpReachNlri getMpReach(final Attributes attrs) {
- final Attributes1 reachAttr = attrs.augmentation(Attributes1.class);
+ final AttributesReach reachAttr = attrs.augmentation(AttributesReach.class);
return reachAttr == null ? null : reachAttr.getMpReachNlri();
}
private static MpUnreachNlri getMpUnreach(final Attributes attrs) {
- final Attributes2 unreachAttr = attrs.augmentation(Attributes2.class);
+ final AttributesUnreach unreachAttr = attrs.augmentation(AttributesUnreach.class);
return unreachAttr == null ? null : unreachAttr.getMpUnreachNlri();
}
}
import org.opendaylight.protocol.bgp.parser.spi.RevisedErrorHandling;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
public final class MPReachAttributeParser extends ReachAttributeParser {
public static final int TYPE = 14;
final RevisedErrorHandling errorHandling, final PeerSpecificParserConstraint constraint)
throws BGPDocumentedException {
try {
- builder.addAugmentation(new Attributes1Builder()
+ builder.addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(reg.parseMpReach(buffer, constraint))
.build());
} catch (final BGPParsingException e) {
@Override
public void serializeAttribute(final Attributes pathAttributes, final ByteBuf byteAggregator) {
- final Attributes1 pathAttributes1 = pathAttributes.augmentation(Attributes1.class);
+ final AttributesReach pathAttributes1 = pathAttributes.augmentation(AttributesReach.class);
if (pathAttributes1 != null) {
final ByteBuf reachBuffer = Unpooled.buffer();
reg.serializeMpReach(pathAttributes1.getMpReachNlri(), reachBuffer);
import org.opendaylight.protocol.bgp.parser.spi.RevisedErrorHandling;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
public final class MPUnreachAttributeParser extends ReachAttributeParser {
public static final int TYPE = 15;
final RevisedErrorHandling errorHandling, final PeerSpecificParserConstraint constraint)
throws BGPDocumentedException {
try {
- builder.addAugmentation(new Attributes2Builder()
+ builder.addAugmentation(new AttributesUnreachBuilder()
.setMpUnreachNlri(reg.parseMpUnreach(buffer, constraint))
.build());
} catch (final BGPParsingException e) {
@Override
public void serializeAttribute(final Attributes attribute, final ByteBuf byteAggregator) {
- final Attributes2 pathAttributes2 = attribute.augmentation(Attributes2.class);
+ final AttributesUnreach pathAttributes2 = attribute.augmentation(AttributesUnreach.class);
if (pathAttributes2 != null) {
final ByteBuf unreachBuffer = Unpooled.buffer();
reg.serializeMpUnReach(pathAttributes2.getMpUnreachNlri(), unreachBuffer);
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.NlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpOrigin;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
final Update message = BGPParserTest.updateParser.parseMessageBody(Unpooled.copiedBuffer(body), messageLength,
null);
- final Class<? extends AddressFamily> afi = message.getAttributes().augmentation(Attributes2.class)
- .getMpUnreachNlri().getAfi();
- final Class<? extends SubsequentAddressFamily> safi = message.getAttributes().augmentation(Attributes2.class)
- .getMpUnreachNlri().getSafi();
+ final Class<? extends AddressFamily> afi = message.getAttributes()
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getAfi();
+ final Class<? extends SubsequentAddressFamily> safi = message.getAttributes()
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getSafi();
assertEquals(Ipv6AddressFamily.class, afi);
assertEquals(UnicastSubsequentAddressFamily.class, safi);
final Update message = BGPParserTest.updateParser.parseMessageBody(Unpooled.copiedBuffer(body), messageLength,
null);
- final Class<? extends AddressFamily> afi = message.getAttributes().augmentation(Attributes2.class)
- .getMpUnreachNlri().getAfi();
- final Class<? extends SubsequentAddressFamily> safi = message.getAttributes().augmentation(Attributes2.class)
- .getMpUnreachNlri().getSafi();
+ final Class<? extends AddressFamily> afi = message.getAttributes()
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getAfi();
+ final Class<? extends SubsequentAddressFamily> safi = message.getAttributes()
+ .augmentation(AttributesUnreach.class).getMpUnreachNlri().getSafi();
assertEquals(Ipv6AddressFamily.class, afi);
assertEquals(UnicastSubsequentAddressFamily.class, safi);
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.OriginBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.Segments;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.SegmentsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.CParameters1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.CParameters1Builder;
new Ipv6PrefixesBuilder().setPrefix(pref2).build(),
new Ipv6PrefixesBuilder().setPrefix(pref3).build())).build()).build()).build());
- paBuilder.addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachBuilder.build()).build());
+ paBuilder.addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReachBuilder.build()).build());
builder.setAttributes(paBuilder.build());
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.Nlri;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
*/
public static MpReachNlri getMpReachNlri(final Attributes attrs) {
if (attrs != null) {
- final Attributes1 aug = attrs.augmentation(Attributes1.class);
+ final AttributesReach aug = attrs.augmentation(AttributesReach.class);
if (aug != null) {
return aug.getMpReachNlri();
}
*/
public static MpUnreachNlri getMpUnreachNlri(final Attributes attrs) {
if (attrs != null) {
- final Attributes2 aug = attrs.augmentation(Attributes2.class);
+ final AttributesUnreach aug = attrs.augmentation(AttributesUnreach.class);
if (aug != null) {
return aug.getMpUnreachNlri();
}
import java.util.Set;
import org.opendaylight.protocol.bgp.rib.spi.BGPSessionListener;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.UnicastSubsequentAddressFamily;
TablesKey type = new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
boolean isEOR = false;
if (msg.getNlri() == null && msg.getWithdrawnRoutes() == null) {
- if (msg.getAttributes() != null) {
- if (msg.getAttributes().augmentation(Attributes1.class) != null) {
- final Attributes1 pa = msg.getAttributes().augmentation(Attributes1.class);
+ final Attributes attrs = msg.getAttributes();
+ if (attrs != null) {
+ if (attrs.augmentation(AttributesReach.class) != null) {
+ final AttributesReach pa = attrs.augmentation(AttributesReach.class);
if (pa.getMpReachNlri() != null) {
type = new TablesKey(pa.getMpReachNlri().getAfi(), pa.getMpReachNlri().getSafi());
}
- } else if (msg.getAttributes().augmentation(Attributes2.class) != null) {
- final Attributes2 pa = msg.getAttributes().augmentation(Attributes2.class);
+ } else if (attrs.augmentation(AttributesUnreach.class) != null) {
+ final AttributesUnreach pa = attrs.augmentation(AttributesUnreach.class);
if (pa.getMpUnreachNlri() != null) {
type = new TablesKey(pa.getMpUnreachNlri().getAfi(), pa.getMpUnreachNlri().getSafi());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
return key.getAfi() == Ipv4AddressFamily.class && key.getSafi() == UnicastSubsequentAddressFamily.class
? new UpdateBuilder().build() : new UpdateBuilder()
.setAttributes(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder()
+ .addAugmentation(new AttributesUnreachBuilder()
.setMpUnreachNlri(new MpUnreachNlriBuilder()
.setAfi(key.getAfi())
.setSafi(key.getSafi())
public static boolean isEndOfRib(final UpdateMessage msg) {
if (msg.getNlri() == null && msg.getWithdrawnRoutes() == null) {
if (msg.getAttributes() != null) {
- final Attributes2 pa = msg.getAttributes().augmentation(Attributes2.class);
- if (pa != null && msg.getAttributes().augmentation(Attributes1.class) == null) {
+ final AttributesUnreach pa = msg.getAttributes().augmentation(AttributesUnreach.class);
+ if (pa != null && msg.getAttributes().augmentation(AttributesReach.class) == null) {
//only MP_UNREACH_NLRI allowed in EOR
if (pa.getMpUnreachNlri() != null && pa.getMpUnreachNlri().getWithdrawnRoutes() == null) {
// EOR message contains only MPUnreach attribute and no NLRI
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.MultiExitDisc;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.Origin;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.UnrecognizedAttributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
private static final InstanceIdentifier<MpReachNlri> MP_REACH_NLRI_II = InstanceIdentifier.create(Update.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path
.attributes.Attributes.class)
- .augmentation(Attributes1.class)
+ .augmentation(AttributesReach.class)
.child(MpReachNlri.class);
private static final InstanceIdentifier<MpUnreachNlri> MP_UNREACH_NLRI_II = InstanceIdentifier.create(Update.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path
- .attributes.Attributes.class).augmentation(Attributes2.class).child(MpUnreachNlri.class);
+ .attributes.Attributes.class).augmentation(AttributesUnreach.class).child(MpUnreachNlri.class);
static {
final Builder<Class<? extends DataObject>> acb = ImmutableSet.builder();
public ContainerNode serializeAttributes(final Attributes pathAttr) {
Preconditions.checkState(this.attributesCodec != null, "Attributes codec not available");
final AttributesBuilder a = new AttributesBuilder(pathAttr);
- a.removeAugmentation(Attributes1.class);
- a.removeAugmentation(Attributes2.class);
+ a.removeAugmentation(AttributesReach.class);
+ a.removeAugmentation(AttributesUnreach.class);
return (ContainerNode) this.attributesCodec.serialize(a.build());
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.OriginatorIdBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.SegmentsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
private static void addAttributeAugmentation(final AttributesBuilder attBuilder, final Ipv4Prefix prefix,
final PathId pathId) {
attBuilder.setUnrecognizedAttributes(Collections.emptyMap());
- attBuilder.addAugmentation(new Attributes1Builder()
+ attBuilder.addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(new MpReachNlriBuilder()
.setCNextHop(new Ipv4NextHopCaseBuilder()
.setIpv4NextHop(new Ipv4NextHopBuilder().setGlobal(NH1).build())
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.NlriBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.unreach.nlri.WithdrawnRoutesBuilder;
assertNull(endOfRib.getWithdrawnRoutes());
final Attributes attributes = endOfRib.getAttributes();
assertNotNull(attributes);
- final Attributes2 augmentation = attributes.augmentation(Attributes2.class);
+ final AttributesUnreach augmentation = attributes.augmentation(AttributesUnreach.class);
assertNotNull(augmentation);
final MpUnreachNlri mpUnreachNlri = augmentation.getMpUnreachNlri();
assertNotNull(mpUnreachNlri);
.build();
final Update ipv6EOT = new UpdateBuilder()
.setAttributes(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(ipv6EOTnlri).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(ipv6EOTnlri).build())
.build())
.build();
.build();
final Update ipv6NonEOT = new UpdateBuilder()
.setAttributes(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder().setMpUnreachNlri(ipv6NonEOTnlri).build())
+ .addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(ipv6NonEOTnlri).build())
.build())
.build();
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.NlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.WithdrawnRoutesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.CParameters1Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.RouteRefreshBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.MultiprotocolCapabilityBuilder;
this.classic.onMessage(this.session, new KeepaliveBuilder().build());
this.classic.onMessage(this.session, new UpdateBuilder()
.setAttributes(new AttributesBuilder()
- .addAugmentation(new Attributes2Builder()
+ .addAugmentation(new AttributesUnreachBuilder()
.setMpUnreachNlri(new MpUnreachNlriBuilder().setAfi(IPV4_AFI).setSafi(SAFI).build())
.build())
.build())
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.Origin;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.OriginBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.as.path.Segments;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.CParameters1Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.SendReceive;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
.setOrigin(origin).setAsPath(asPath).setLocalPref(localPref);
if (mpReach != null) {
- attributeBuilder.addAugmentation(new Attributes1Builder().setMpReachNlri(mpReach).build());
+ attributeBuilder.addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReach).build());
}
if (mpUnreach != null) {
- attributeBuilder.addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreach).build());
+ attributeBuilder.addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreach).build());
}
return new UpdateBuilder()
.setOrigin(origin)
.setAsPath(asPath)
.setLocalPref(localPref)
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReach).build())
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpReach).build())
.build()).build();
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.update.message.NlriBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
mpBuilder.setSafi(UnicastSubsequentAddressFamily.class);
AttributesBuilder paBuilder = new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpBuilder.build()).build());
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpBuilder.build()).build());
this.ipv6m = new UpdateBuilder().setAttributes(paBuilder.build()).build();
mpBuilder.setSafi(LinkstateSubsequentAddressFamily.class);
paBuilder = new AttributesBuilder()
- .addAugmentation(new Attributes1Builder().setMpReachNlri(mpBuilder.build()).build());
+ .addAugmentation(new AttributesReachBuilder().setMpReachNlri(mpBuilder.build()).build());
this.lsm = new UpdateBuilder().setAttributes(paBuilder.build()).build();
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
if (!advertised.isEmpty()) {
final MpReachNlri mb = buildReach(advertised, hop);
- ab.addAugmentation(new Attributes1Builder().setMpReachNlri(mb).build());
+ ab.addAugmentation(new AttributesReachBuilder().setMpReachNlri(mb).build());
LOG.debug("mpreach nexthop={}", mb);
}
if (!withdrawn.isEmpty()) {
final MpUnreachNlri mb = buildUnreach(withdrawn);
- ab.addAugmentation(new Attributes2Builder().setMpUnreachNlri(mb).build());
+ ab.addAugmentation(new AttributesUnreachBuilder().setMpUnreachNlri(mb).build());
LOG.debug("mpunrach mb={}", mb);
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
private static final InstanceIdentifier<Attributes> ATTRIBUTES_IID = InstanceIdentifier.create(Update.class)
.child(Attributes.class);
private static final InstanceIdentifier<MpUnreachNlri> MP_UNREACH_IID = ATTRIBUTES_IID
- .augmentation(Attributes2.class).child(MpUnreachNlri.class);
- private static final InstanceIdentifier<MpReachNlri> MP_REACH_IID = ATTRIBUTES_IID.augmentation(Attributes1.class)
- .child(MpReachNlri.class);
+ .augmentation(AttributesUnreach.class).child(MpUnreachNlri.class);
+ private static final InstanceIdentifier<MpReachNlri> MP_REACH_IID = ATTRIBUTES_IID
+ .augmentation(AttributesReach.class).child(MpReachNlri.class);
@Mock
protected DOMDataTreeWriteTransaction tx;
protected List<InstanceIdentifier<R>> deletedRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.destination.DestinationType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
.setCNextHop(nextHop).setAdvertizedRoutes(new AdvertizedRoutesBuilder().build()).build();
final Attributes attMpR = new AttributesBuilder().addAugmentation(
- new Attributes1Builder().setMpReachNlri(mpReach).build()).build();
+ new AttributesReachBuilder().setMpReachNlri(mpReach).build()).build();
assertEquals(new UpdateBuilder().setAttributes(attMpR).build(),
this.ribSupportTestImp.buildUpdate(routes, Collections.emptySet(), attr));
.setWithdrawnRoutes(new WithdrawnRoutesBuilder().build()).build();
final Attributes attMpU = new AttributesBuilder().addAugmentation(
- new Attributes2Builder().setMpUnreachNlri(mpUnreach).build()).build();
+ new AttributesUnreachBuilder().setMpUnreachNlri(mpUnreach).build()).build();
assertEquals(new UpdateBuilder().setAttributes(attMpU).build(),
this.ribSupportTestImp.buildUpdate(Collections.emptySet(), routes, attr));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.LocalPrefBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.MultiExitDiscBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.OriginBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReachBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpOrigin;
.setMultiExitDisc(new MultiExitDiscBuilder().setMed(Uint32.ZERO).build())
.setLocalPref(new LocalPrefBuilder().setPref(Uint32.valueOf(100L)).build())
.setExtendedCommunities(createExtComm(extCom))
- .addAugmentation(new Attributes1Builder()
+ .addAugmentation(new AttributesReachBuilder()
.setMpReachNlri(new MpReachNlriBuilder()
.setCNextHop(NEXT_HOP)
.setAfi(Ipv4AddressFamily.class)
.build())
.build();
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.prefixes.destination.ipv4.Ipv4PrefixesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationIpv4CaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateMessage;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
MpReachNlri mpReach = null;
if (message.getNlri() != null) {
mpReach = prefixesToMpReach(message);
- } else if (attrs != null && attrs.augmentation(Attributes1.class) != null) {
- mpReach = attrs.augmentation(Attributes1.class).getMpReachNlri();
+ } else if (attrs != null && attrs.augmentation(AttributesReach.class) != null) {
+ mpReach = attrs.augmentation(AttributesReach.class).getMpReachNlri();
}
if (mpReach != null) {
addRoutes(mpReach, attrs);
MpUnreachNlri mpUnreach = null;
if (message.getWithdrawnRoutes() != null) {
mpUnreach = prefixesToMpUnreach(message);
- } else if (attrs != null && attrs.augmentation(Attributes2.class) != null) {
- mpUnreach = attrs.augmentation(Attributes2.class).getMpUnreachNlri();
+ } else if (attrs != null && attrs.augmentation(AttributesUnreach.class) != null) {
+ mpUnreach = attrs.augmentation(AttributesUnreach.class).getMpUnreachNlri();
}
if (mpUnreach != null) {
removeRoutes(mpUnreach);
boolean isEOR = false;
if (msg.getNlri() == null && msg.getWithdrawnRoutes() == null) {
if (msg.getAttributes() != null) {
- if (msg.getAttributes().augmentation(Attributes1.class) != null) {
- final Attributes1 pa = msg.getAttributes().augmentation(Attributes1.class);
+ if (msg.getAttributes().augmentation(AttributesReach.class) != null) {
+ final AttributesReach pa = msg.getAttributes().augmentation(AttributesReach.class);
if (pa.getMpReachNlri() != null) {
type = new TablesKey(pa.getMpReachNlri().getAfi(), pa.getMpReachNlri().getSafi());
}
- } else if (msg.getAttributes().augmentation(Attributes2.class) != null) {
- final Attributes2 pa = msg.getAttributes().augmentation(Attributes2.class);
+ } else if (msg.getAttributes().augmentation(AttributesUnreach.class) != null) {
+ final AttributesUnreach pa = msg.getAttributes().augmentation(AttributesUnreach.class);
if (pa.getMpUnreachNlri() != null) {
type = new TablesKey(pa.getMpUnreachNlri().getAfi(), pa.getMpUnreachNlri().getSafi());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.Update;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesReach;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.AttributesUnreach;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
private static final InstanceIdentifier<MpReachNlri> MP_REACH_NLRI_II = InstanceIdentifier.create(Update.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path
- .attributes.Attributes.class).augmentation(Attributes1.class).child(MpReachNlri.class);
+ .attributes.Attributes.class).augmentation(AttributesReach.class).child(MpReachNlri.class);
private static final InstanceIdentifier<MpUnreachNlri> MP_UNREACH_NLRI_II = InstanceIdentifier.create(Update.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path
- .attributes.Attributes.class).augmentation(Attributes2.class).child(MpUnreachNlri.class);
+ .attributes.Attributes.class).augmentation(AttributesUnreach.class).child(MpUnreachNlri.class);
private static final NodeIdentifier BGP_ROUTES_NODE_ID = new NodeIdentifier(BMP_ROUTES_QNAME);
private final YangInstanceIdentifier tableId;
private ContainerNode serializeAttributes(final Attributes pathAttr) {
Preconditions.checkState(this.attributesCodec != null, "Attributes codec not available");
final AttributesBuilder a = new AttributesBuilder(pathAttr);
- a.removeAugmentation(Attributes1.class);
- a.removeAugmentation(Attributes2.class);
+ a.removeAugmentation(AttributesReach.class);
+ a.removeAugmentation(AttributesUnreach.class);
return (ContainerNode) this.attributesCodec.serialize(a.build());
}
}