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