Merge "Added controller is-connected code"
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / ConfigurationService.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.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
14
15 import java.net.InetAddress;
16 import java.util.Map;
17 import org.apache.commons.lang3.tuple.Pair;
18
19 /**
20  * The ConfigurationService handles the configuration of the OpenStack Neutron Integration
21  * It exposes a set of Configuration variables and helper functions for obtaining node-specific
22  * configuration from the Open_vSwitch table of an OVS instance.
23  */
24 public interface ConfigurationService {
25
26     /**
27      * Returns the name configured name of the Integration Bridge
28      */
29     public String getIntegrationBridgeName();
30
31     /**
32      * Configures the name of the Integration Bridge
33      */
34     public void setIntegrationBridgeName(String integrationBridgeName);
35
36     /**
37      * Returns the name configured name of the Network Bridge
38      */
39     public String getNetworkBridgeName();
40
41     /**
42      * Configures the name of the Network Bridge
43      */
44     public void setNetworkBridgeName(String networkBridgeName);
45
46     /**
47      * Returns the name configured name of the ExternalBridge
48      */
49     public String getExternalBridgeName();
50
51     /**
52      * Configures the name of the External Bridge
53      */
54     public void setExternalBridgeName(String externalBridgeName);
55
56     /**
57      * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
58      */
59     public String getTunnelEndpointKey();
60
61     /**
62      * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
63      */
64     public void setTunnelEndpointKey(String tunnelEndpointKey);
65
66     /**
67      * Returns a Map of patch port names where the key is a tuple of source bridge and destination bridge
68      */
69     public Map<Pair<String, String>, String> getPatchPortNames();
70
71     /**
72      * Sets the Map of source/destination bridges to patch port name
73      */
74     public void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
75
76     /**
77      * Get the name of a patch port
78      * @param portTuple a {@link org.apache.commons.lang3.tuple.Pair} where L
79      *                  is the source bridge and R the destination bridge
80      * @return the name of the patch port
81      */
82     public String getPatchPortName(Pair portTuple);
83
84     /**
85      * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
86      */
87     public String getProviderMappingsKey();
88
89     /**
90      * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
91      */
92     public void setProviderMappingsKey(String providerMappingsKey);
93
94     /**
95      * Gets the default provider mapping
96      */
97     public String getDefaultProviderMapping();
98
99     /**
100      * Sets the default provider mapping
101      */
102     public void setDefaultProviderMapping(String providerMapping);
103
104     /**
105      * Gets the tunnel endpoint address for a given Node
106      * @param node a {@link Node}
107      * @return the tunnel endpoint
108      * @see java.net.InetAddress
109      */
110     public InetAddress getTunnelEndPoint(Node node);
111
112     /**
113      * Returns the OpenFlow version to be used by the {@link NetworkingProvider}
114      * Default is OpenFlow 1.0. OVS versions greater than 1.10.0 will use OpenFlow 1.3
115      * @param node the node to query
116      * @return the OpenFlow version to use
117      */
118     public String getOpenflowVersion(Node node);
119
120     /**
121      * Returns the MacAddress to be used for the default gateway by the {@link L3ForwardingProvider}
122      * There is no default.
123      * @param node the node to query
124      * @return the MacAddress to use for the default gateway; or null if none is configured.
125      */
126     public String getDefaultGatewayMacAddress(Node node);
127 }