Implementing VNI generation for VBD
[groupbasedpolicy.git] / renderers / vpp / src / main / java / org / opendaylight / groupbasedpolicy / renderer / vpp / api / BridgeDomainManager.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
9 package org.opendaylight.groupbasedpolicy.renderer.vpp.api;
10
11 import javax.annotation.Nonnull;
12
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanVni;
15 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
16
17 import com.google.common.util.concurrent.ListenableFuture;
18
19 /**
20  * Bridge domain manager interface.
21  */
22 public interface BridgeDomainManager {
23
24     /**
25      * Creates a bridge domain on VPP node and it also adds tunnels of the bridge domain to VXLAN
26      * full mesh topology
27      *
28      * @param bridgeDomainName name of bridge domain
29      * @param vni VXLAN VNI used in full mesh topology for the given bridge domain
30      * @param vppNodeId VPP node where the bridge domain should be created
31      * @return {@link ListenableFuture}
32      */
33     ListenableFuture<Void> createVxlanBridgeDomainOnVppNode(@Nonnull String bridgeDomainName, @Nonnull VxlanVni vni, @Nonnull NodeId vppNodeId);
34
35     /**
36      * Creates a bridge domain on VPP node and it also adds tunnels of the bridge domain to VLAN
37      * full mesh topology
38      *
39      * @param bridgeDomainName name of bridge domain
40      * @param vlanId VLAN ID used in full mesh topology for the given bridge domain
41      * @param vppNodeId VPP node where the bridge domain should be created
42      * @return {@link ListenableFuture}
43      */
44
45     ListenableFuture<Void> createVlanBridgeDomainOnVppNode(@Nonnull String bridgeDomainName, @Nonnull VlanId vlanId, @Nonnull NodeId vppNodeId);
46
47     /**
48      * Removes a bridge domain from VPP node and it also removes tunnels of the bridge domain from
49      * VXLAN full mesh topology
50      *
51      * @param bridgeDomainName name of bridge domain
52      * @param vppNode VPP node where the bridge domain should be removed from
53      * @return {@link ListenableFuture}
54      */
55     ListenableFuture<Void> removeBridgeDomainFromVppNode(@Nonnull String bridgeDomainName, NodeId vppNode);
56
57 }