use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class EvpnRibSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new EvpnRoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new EvpnRoutesCaseBuilder().setEvpnRoutes(new EvpnRoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new EvpnRoutesCaseBuilder().setEvpnRoutes(EVPN_ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class FlowspecIpv6RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new FlowspecIpv6RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new FlowspecIpv6RoutesCaseBuilder().setFlowspecIpv6Routes(new FlowspecIpv6RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new FlowspecIpv6RoutesCaseBuilder().setFlowspecIpv6Routes(new FlowspecIpv6RoutesBuilder().setFlowspecRoute(Collections.singletonList(ROUTE)).build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class FlowspecL3vpnIpv4RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new FlowspecL3vpnIpv4RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new FlowspecL3vpnIpv4RoutesCaseBuilder().setFlowspecL3vpnIpv4Routes(new FlowspecL3vpnIpv4RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new FlowspecL3vpnIpv4RoutesCaseBuilder().setFlowspecL3vpnIpv4Routes(new FlowspecL3vpnIpv4RoutesBuilder().setFlowspecL3vpnRoute(Collections.singletonList(ROUTE)).build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class IPv4RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new Ipv4RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new Ipv4RoutesCaseBuilder().setIpv4Routes(new Ipv4RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new Ipv4RoutesCaseBuilder().setIpv4Routes(ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class IPv6RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new Ipv6RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new Ipv6RoutesCaseBuilder().setIpv6Routes(new Ipv6RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new Ipv6RoutesCaseBuilder().setIpv6Routes(ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
Aggregations