Merge "Added per-flow TEP and per-port TEP example in SW schema IT"
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / TenantNetworkManager.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.
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  *  Authors : Dave Tucker
9  */
10
11 package org.opendaylight.ovsdb.openstack.netvirt.api;
12
13 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;
14 import org.opendaylight.controller.sal.core.Node;
15 import org.opendaylight.ovsdb.schema.openvswitch.Interface;
16
17 /**
18  * Open vSwitch isolates Tenant Networks using VLANs on the Integration Bridge
19  * This class manages the provisioning of these VLANs
20  */
21 public interface TenantNetworkManager {
22
23     /**
24      * Get the VLAN assigned to the provided Network
25      * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
26      * @param networkId the Neutron Network ID
27      * @return the assigned VLAN ID or 0 in case of an error
28      */
29     public int getInternalVlan(Node node, String networkId);
30
31     /**
32      * Reclaim the assigned VLAN for the given Network
33      * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
34      * @param portUUID the UUID of the neutron Port
35      * @param network the Neutron Network ID
36      */
37     public void reclaimInternalVlan(Node node, String portUUID, NeutronNetwork network);
38
39     /**
40      * Configures the VLAN for a Tenant Network
41      * @param node the {@link org.opendaylight.controller.sal.core.Node} to configure
42      * @param portUUID the UUID of the port to configure
43      * @param network the Neutron Network ID
44      */
45     public void programInternalVlan(Node node, String portUUID, NeutronNetwork network);
46
47     /**
48      * Check is the given network is present on a Node
49      * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
50      * @param segmentationId the Neutron Segementation ID
51      * @return True or False
52      */
53     public boolean isTenantNetworkPresentInNode(Node node, String segmentationId);
54
55     /**
56      * Get the Neutron Network ID for a given Segmentation ID
57      */
58     public String getNetworkId (String segmentationId);
59
60     /**
61      * Get the {@link org.opendaylight.controller.networkconfig.neutron.NeutronNetwork} for a given Interface
62      */
63     public NeutronNetwork getTenantNetwork(Interface intf);
64
65     /**
66      * Network Created Callback
67      */
68     @Deprecated
69     public void networkCreated (String networkId);
70
71     /**
72      * Network Created Callback
73      */
74     public int networkCreated (Node node, String networkId);
75
76     /**
77      * Network Deleted Callback
78      */
79     public void networkDeleted(String id);
80 }