Bump versions to 0.21.6-SNAPSHOT
[bgpcep.git] / bgp / extensions / evpn / src / main / java / org / opendaylight / protocol / bgp / evpn / spi / EvpnRegistry.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.bgp.evpn.spi;
9
10 import io.netty.buffer.ByteBuf;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.NlriType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.evpn.EvpnChoice;
15 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
16
17 @NonNullByDefault
18 public interface EvpnRegistry {
19     /**
20      * Decode input buffer to BGP Evpn.
21      *
22      * @param type Nlri Type
23      * @param buffer encoded EvpnChoice body in Bytebuf
24      * @return EvpnChoice
25      */
26     @Nullable EvpnChoice parseEvpn(NlriType type, ByteBuf buffer);
27
28     /**
29      * Encode input BGP Evpn to output buffer.
30      *
31      * @param evpn EvpnChoice
32      * @param common encoded common Evpn
33      * @return encoded EvpnChoice body in Bytebuf
34      */
35     ByteBuf serializeEvpn(EvpnChoice evpn, ByteBuf common);
36
37     /**
38      * Decode Evpn Model to Evpn.
39      *
40      * @param evpnChoice ChoiceNode containing Evpn
41      * @return EvpnChoice
42      */
43     @Nullable EvpnChoice serializeEvpnModel(ChoiceNode evpnChoice);
44
45     /**
46      * Create Route key from Evpn model.
47      *
48      * @param evpnChoice ChoiceNode containing Evpn
49      * @return EvpnChoice
50      */
51     @Nullable EvpnChoice serializeEvpnRouteKey(ChoiceNode evpnChoice);
52 }