2 * Copyright (c) 2014, 2015 Red Hat, 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.ovsdb.openstack.netvirt.api;
11 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
13 import java.net.InetAddress;
15 import org.apache.commons.lang3.tuple.Pair;
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.
22 public interface ConfigurationService {
25 * @return the name configured name of the Integration Bridge
27 String getIntegrationBridgeName();
30 * Configures the name of the Integration Bridge
31 * @param integrationBridgeName name of integration bridge
33 void setIntegrationBridgeName(String integrationBridgeName);
36 * @return the name configured name of the Network Bridge
38 String getNetworkBridgeName();
41 * Configures the name of the Network Bridge
42 * @param networkBridgeName Name of the network bridge
44 void setNetworkBridgeName(String networkBridgeName);
47 * @return the name configured name of the ExternalBridge
49 String getExternalBridgeName();
52 * Configures the name of the External Bridge
53 * @param externalBridgeName Name of external bridge
55 void setExternalBridgeName(String externalBridgeName);
58 * @return the key used to access the Tunnel Endpoint configuration from Open vSwitch
60 String getTunnelEndpointKey();
63 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
64 * @param tunnelEndpointKey key of tunnel end point
66 void setTunnelEndpointKey(String tunnelEndpointKey);
69 * @return a Map of patch port names where the key is a tuple of source bridge and destination bridge
71 Map<Pair<String, String>, String> getPatchPortNames();
74 * Sets the Map of source/destination bridges to patch port name
75 * @param patchPortNames Map of source/destination bridges to patch port name
77 void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
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
85 String getPatchPortName(Pair portTuple);
88 * @return the key used to access the Tunnel Endpoint configuration from Open vSwitch
90 String getProviderMappingsKey();
93 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
94 * @param providerMappingsKey provide mapping key
96 void setProviderMappingsKey(String providerMappingsKey);
99 * @return Gets the default provider mapping
101 String getDefaultProviderMapping();
104 * Sets the default provider mapping
105 * @param providerMapping provider mapping
107 void setDefaultProviderMapping(String providerMapping);
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
115 InetAddress getTunnelEndPoint(Node node);
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
123 String getOpenflowVersion(Node node);
126 * Determine if L3 forwarding is enabled
127 * @return true if ovsdb net-virt is configured to perform L3 forwarding
129 boolean isL3ForwardingEnabled();
132 * Determine if Distributed ARP Responder is enabled
133 * @return true if ovsdb net-virt is configured for distributed arp responder
135 boolean isDistributedArpDisabled();
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.
143 String getDefaultGatewayMacAddress(Node node);
145 boolean isUserSpaceEnabled();