2 * Copyright (C) 2014 Red Hat, Inc.
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
8 * Authors : Dave Tucker
11 package org.opendaylight.ovsdb.openstack.netvirt.api;
13 import org.opendaylight.controller.sal.core.Node;
15 import org.apache.commons.lang3.tuple.Pair;
17 import java.net.InetAddress;
21 * The ConfigurationService handles the configuration of the OpenStack Neutron Integration
22 * It exposes a set of Configuration variables and helper functions for obtaining node-specific
23 * configuration from the Open_vSwitch table of an OVS instance.
25 public interface ConfigurationService {
28 * Returns the name configured name of the Integration Bridge
30 public String getIntegrationBridgeName();
33 * Configures the name of the Integration Bridge
35 public void setIntegrationBridgeName(String integrationBridgeName);
38 * Returns the name configured name of the Network Bridge
40 public String getNetworkBridgeName();
43 * Configures the name of the Network Bridge
45 public void setNetworkBridgeName(String networkBridgeName);
48 * Returns the name configured name of the ExternalBridge
50 public String getExternalBridgeName();
53 * Configures the name of the External Bridge
55 public void setExternalBridgeName(String externalBridgeName);
58 * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
60 public String getTunnelEndpointKey();
63 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
65 public void setTunnelEndpointKey(String tunnelEndpointKey);
68 * Returns a Map of patch port names where the key is a tuple of source bridge and destination bridge
70 public Map<Pair<String, String>, String> getPatchPortNames();
73 * Sets the Map of source/destination bridges to patch port name
75 public void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
78 * Get the name of a patch port
79 * @param portTuple a {@link org.apache.commons.lang3.tuple.Pair} where L
80 * is the source bridge and R the destination bridge
81 * @return the name of the patch port
83 public String getPatchPortName(Pair portTuple);
86 * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
88 public String getProviderMappingsKey();
91 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
93 public void setProviderMappingsKey(String providerMappingsKey);
96 * Gets the default provider mapping
98 public String getDefaultProviderMapping();
101 * Sets the default provider mapping
103 public void setDefaultProviderMapping(String providerMapping);
106 * Gets the tunnel endpoint address for a given Node
107 * @param node a {@link org.opendaylight.controller.sal.core.Node}
108 * @return the tunnel endpoint
109 * @see java.net.InetAddress
111 public InetAddress getTunnelEndPoint(Node node);
114 * Returns the OpenFlow version to be used by the {@link NetworkingProvider}
115 * Default is OpenFlow 1.0. OVS versions greater than 1.10.0 will use OpenFlow 1.3
116 * @param node the node to query
117 * @return the OpenFlow version to use
119 public String getOpenflowVersion(Node node);
122 * Returns the MacAddress to be used for the default gateway by the {@link L3ForwardingProvider}
123 * There is no default.
124 * @param node the node to query
125 * @return the MacAddress to use for the default gateway; or null if none is configured.
127 public String getDefaultGatewayMacAddress(Node node);