2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.protocol.bgp.evpn.spi;
11 import io.netty.buffer.ByteBuf;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.NlriType;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.evpn.EvpnChoice;
16 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
18 public interface EvpnRegistry {
20 * Decode input buffer to BGP Evpn.
22 * @param type Nlri Type
23 * @param buffer encoded EvpnChoice body in Bytebuf
26 @Nullable EvpnChoice parseEvpn(@Nonnull NlriType type, @Nonnull ByteBuf buffer);
29 * Encode input BGP Evpn to output buffer.
31 * @param evpn EvpnChoice
32 * @param common encoded common Evpn
33 * @return encoded EvpnChoice body in Bytebuf
35 @Nonnull ByteBuf serializeEvpn(@Nonnull EvpnChoice evpn, @Nonnull ByteBuf common);
38 * Decode Evpn Model to Evpn.
40 * @param evpnChoice ChoiceNode containing Evpn
43 @Nullable EvpnChoice serializeEvpnModel(@Nonnull ChoiceNode evpnChoice);
46 * Create Route key from Evpn model.
48 * @param evpnChoice ChoiceNode containing Evpn
51 @Nullable EvpnChoice serializeEvpnRouteKey(@Nonnull ChoiceNode evpnChoice);