use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.bgp.rib.rib.loc.rib.tables.routes.FlowspecL3vpnIpv6RoutesCaseBuilder in project bgpcep by opendaylight.
the class FlowspecL3vpnIpv6RIBSupportTest method testEmptyRoute.
@Test
public void testEmptyRoute() {
final Routes empty = new FlowspecL3vpnIpv6RoutesCaseBuilder().setFlowspecL3vpnIpv6Routes(new FlowspecL3vpnIpv6RoutesBuilder().setFlowspecL3vpnRoute(Collections.emptyList()).build()).build();
final ChoiceNode emptyRoutes = RIB_SUPPORT.emptyRoutes();
assertEquals(createRoutes(empty), emptyRoutes);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.bgp.rib.rib.loc.rib.tables.routes.FlowspecL3vpnIpv6RoutesCaseBuilder in project bgpcep by opendaylight.
the class FlowspecL3vpnIpv6RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new FlowspecL3vpnIpv6RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
assertTrue(this.ribSupport.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new FlowspecL3vpnIpv6RoutesCaseBuilder().setFlowspecL3vpnIpv6Routes(new FlowspecL3vpnIpv6RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
assertTrue(this.ribSupport.changedRoutes(tree).isEmpty());
final Routes routes = new FlowspecL3vpnIpv6RoutesCaseBuilder().setFlowspecL3vpnIpv6Routes(new FlowspecL3vpnIpv6RoutesBuilder().setFlowspecL3vpnRoute(Map.of(ROUTE.key(), ROUTE)).build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = this.ribSupport.changedRoutes(tree);
assertFalse(result.isEmpty());
}
Aggregations