Search in sources :

Example 1 with EvpnSerializer

use of org.opendaylight.protocol.bgp.evpn.spi.EvpnSerializer in project bgpcep by opendaylight.

the class SimpleEvpnNlriRegistry method getEvpnCase.

private EvpnChoice getEvpnCase(final ChoiceNode evpnChoice, final SerializerInterface serializerInterface) {
    Preconditions.checkArgument(evpnChoice != null && !evpnChoice.getValue().isEmpty(), "Evpn case is mandatory. Can't be null or empty.");
    final ContainerNode cont = (ContainerNode) Iterables.getOnlyElement(evpnChoice.getValue());
    final EvpnSerializer serializer = this.modelHandlers.get(cont.getIdentifier());
    if (serializer == null) {
        return null;
    }
    return serializerInterface.check(serializer, cont);
}
Also used : EvpnSerializer(org.opendaylight.protocol.bgp.evpn.spi.EvpnSerializer) ContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)

Aggregations

EvpnSerializer (org.opendaylight.protocol.bgp.evpn.spi.EvpnSerializer)1 ContainerNode (org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)1