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 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171207.NlriType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171207.evpn.EvpnChoice;
15 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
17 public interface EvpnRegistry {
19 * Decode input buffer to BGP Evpn.
21 * @param type Nlri Type
22 * @param buffer encoded EvpnChoice body in Bytebuf
25 EvpnChoice parseEvpn(@Nonnull NlriType type, @Nonnull ByteBuf buffer);
28 * Encode input BGP Evpn to output buffer
30 * @param evpn EvpnChoice
31 * @param common encoded common Evpn
32 * @return encoded EvpnChoice body in Bytebuf
34 ByteBuf serializeEvpn(@Nonnull EvpnChoice evpn, @Nonnull ByteBuf common);
37 * Decode Evpn Model to Evpn.
39 * @param evpnChoice ChoiceNode containing Evpn
42 EvpnChoice serializeEvpnModel(@Nonnull ChoiceNode evpnChoice);
45 * Create Route key from Evpn model
47 * @param evpnChoice ChoiceNode containing Evpn
50 EvpnChoice serializeEvpnRouteKey(@Nonnull ChoiceNode evpnChoice);