use of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates in project bgpcep by opendaylight.
the class RibSupportUtilsTest method toYangKey.
@Test
public void toYangKey() {
final NodeIdentifierWithPredicates result = RibSupportUtils.toYangKey(SupportedTables.QNAME, TABLE_KEY);
assertEquals(NII.toString(), result.toString());
}
use of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates in project bgpcep by opendaylight.
the class RibSupportUtilsTest method testYangKey.
@Test
public void testYangKey() {
final NodeIdentifierWithPredicates p = RibSupportUtils.toYangKey(SupportedTables.QNAME, TABLE_KEY);
final Map<QName, Object> m = p.getKeyValues();
assertFalse(m.isEmpty());
assertEquals(SupportedTables.QNAME, p.getNodeType());
assertTrue(m.containsValue(BindingReflections.findQName(AFI)));
assertTrue(m.containsValue(BindingReflections.findQName(SAFI)));
}
use of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates in project bgpcep by opendaylight.
the class RibSupportUtilsTest method testYangTablesKey.
@Test
public void testYangTablesKey() {
final NodeIdentifierWithPredicates p = RibSupportUtils.toYangTablesKey(TABLE_KEY);
final Map<QName, Object> m = p.getKeyValues();
assertFalse(m.isEmpty());
assertEquals(Tables.QNAME, p.getNodeType());
assertTrue(m.containsValue(BindingReflections.findQName(AFI)));
assertTrue(m.containsValue(BindingReflections.findQName(SAFI)));
}
use of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates in project bgpcep by opendaylight.
the class EvpnRibSupportTest method testRoutePath.
@Test
public void testRoutePath() {
final NodeIdentifierWithPredicates prefixNii = createRouteNIWP(EVPN_ROUTES);
assertEquals(getRoutePath().node(prefixNii), RIB_SUPPORT.routePath(getTablePath().node(Routes.QNAME), prefixNii));
}
use of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates in project bgpcep by opendaylight.
the class EvpnRibSupport method createRouteKey.
private NodeIdentifierWithPredicates createRouteKey(final UnkeyedListEntryNode evpn) {
final ByteBuf buffer = Unpooled.buffer();
final EvpnDestination dest = EvpnNlriParser.extractRouteKeyDestination(evpn);
EvpnNlriParser.serializeNlri(Collections.singletonList(dest), buffer);
return new NodeIdentifierWithPredicates(routeQName(), ROUTE_KEY_QNAME, ByteArray.encodeBase64(buffer));
}
Aggregations