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 java.net.UnknownHostException;
14 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
16 import org.apache.commons.lang3.tuple.Pair;
18 import java.net.InetAddress;
22 * The ConfigurationService handles the configuration of the OpenStack Neutron Integration
23 * It exposes a set of Configuration variables and helper functions for obtaining node-specific
24 * configuration from the Open_vSwitch table of an OVS instance.
26 public interface ConfigurationService {
29 * Returns the name configured name of the Integration Bridge
31 public String getIntegrationBridgeName();
34 * Configures the name of the Integration Bridge
36 public void setIntegrationBridgeName(String integrationBridgeName);
39 * Returns the name configured name of the Network Bridge
41 public String getNetworkBridgeName();
44 * Configures the name of the Network Bridge
46 public void setNetworkBridgeName(String networkBridgeName);
49 * Returns the name configured name of the ExternalBridge
51 public String getExternalBridgeName();
54 * Configures the name of the External Bridge
56 public void setExternalBridgeName(String externalBridgeName);
59 * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
61 public String getTunnelEndpointKey();
64 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
66 public void setTunnelEndpointKey(String tunnelEndpointKey);
69 * Returns a Map of patch port names where the key is a tuple of source bridge and destination bridge
71 public Map<Pair<String, String>, String> getPatchPortNames();
74 * Sets the Map of source/destination bridges to patch port name
76 public void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
79 * Get the name of a patch port
80 * @param portTuple a {@link org.apache.commons.lang3.tuple.Pair} where L
81 * is the source bridge and R the destination bridge
82 * @return the name of the patch port
84 public String getPatchPortName(Pair portTuple);
87 * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
89 public String getProviderMappingsKey();
92 * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
94 public void setProviderMappingsKey(String providerMappingsKey);
97 * Gets the default provider mapping
99 public String getDefaultProviderMapping();
102 * Sets the default provider mapping
104 public void setDefaultProviderMapping(String providerMapping);
107 * Gets the tunnel endpoint address for a given Node
108 * @param node a {@link org.opendaylight.controller.sal.core.Node}
109 * @return the tunnel endpoint
110 * @see java.net.InetAddress
112 public InetAddress getTunnelEndPoint(Node node);
115 * Returns the OpenFlow version to be used by the {@link NetworkingProvider}
116 * Default is OpenFlow 1.0. OVS versions greater than 1.10.0 will use OpenFlow 1.3
117 * @param node the node to query
118 * @return the OpenFlow version to use
120 public String getOpenflowVersion(Node node);
123 * Returns the MacAddress to be used for the default gateway by the {@link L3ForwardingProvider}
124 * There is no default.
125 * @param node the node to query
126 * @return the MacAddress to use for the default gateway; or null if none is configured.
128 public String getDefaultGatewayMacAddress(Node node);