Merge changes from topic 'sonar-cleanup'
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / ConfigurationService.java
index f1edd8c7aed95ea444c82bf1ac7b40ebe6873fc1..209530b0ed4abe92547aafaa06b8cc1a29b047ad 100644 (file)
@@ -1,21 +1,18 @@
 /*
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- *  Authors : Dave Tucker
  */
 
 package org.opendaylight.ovsdb.openstack.netvirt.api;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-
-import org.apache.commons.lang3.tuple.Pair;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
 
 import java.net.InetAddress;
 import java.util.Map;
+import org.apache.commons.lang3.tuple.Pair;
 
 /**
  * The ConfigurationService handles the configuration of the OpenStack Neutron Integration
@@ -25,54 +22,59 @@ import java.util.Map;
 public interface ConfigurationService {
 
     /**
-     * Returns the name configured name of the Integration Bridge
+     * @return the name configured name of the Integration Bridge
      */
-    public String getIntegrationBridgeName();
+    String getIntegrationBridgeName();
 
     /**
      * Configures the name of the Integration Bridge
+     * @param integrationBridgeName name of integration bridge
      */
-    public void setIntegrationBridgeName(String integrationBridgeName);
+    void setIntegrationBridgeName(String integrationBridgeName);
 
     /**
-     * Returns the name configured name of the Network Bridge
+     * @return the name configured name of the Network Bridge
      */
-    public String getNetworkBridgeName();
+    String getNetworkBridgeName();
 
     /**
      * Configures the name of the Network Bridge
+     * @param networkBridgeName Name of the network bridge
      */
-    public void setNetworkBridgeName(String networkBridgeName);
+    void setNetworkBridgeName(String networkBridgeName);
 
     /**
-     * Returns the name configured name of the ExternalBridge
+     * @return the name configured name of the ExternalBridge
      */
-    public String getExternalBridgeName();
+    String getExternalBridgeName();
 
     /**
      * Configures the name of the External Bridge
+     * @param externalBridgeName Name of external bridge
      */
-    public void setExternalBridgeName(String externalBridgeName);
+    void setExternalBridgeName(String externalBridgeName);
 
     /**
-     * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
+     * @return the key used to access the Tunnel Endpoint configuration from Open vSwitch
      */
-    public String getTunnelEndpointKey();
+    String getTunnelEndpointKey();
 
     /**
      * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
+     * @param tunnelEndpointKey key of tunnel end point
      */
-    public void setTunnelEndpointKey(String tunnelEndpointKey);
+    void setTunnelEndpointKey(String tunnelEndpointKey);
 
     /**
-     * Returns a Map of patch port names where the key is a tuple of source bridge and destination bridge
+     * @return a Map of patch port names where the key is a tuple of source bridge and destination bridge
      */
-    public Map<Pair<String, String>, String> getPatchPortNames();
+    Map<Pair<String, String>, String> getPatchPortNames();
 
     /**
      * Sets the Map of source/destination bridges to patch port name
+     * @param patchPortNames Map of source/destination bridges to patch port name
      */
-    public void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
+    void setPatchPortNames(Map<Pair<String, String>, String> patchPortNames);
 
     /**
      * Get the name of a patch port
@@ -80,27 +82,29 @@ public interface ConfigurationService {
      *                  is the source bridge and R the destination bridge
      * @return the name of the patch port
      */
-    public String getPatchPortName(Pair portTuple);
+    String getPatchPortName(Pair portTuple);
 
     /**
-     * Returns the key used to access the Tunnel Endpoint configuration from Open vSwitch
+     * @return the key used to access the Tunnel Endpoint configuration from Open vSwitch
      */
-    public String getProviderMappingsKey();
+    String getProviderMappingsKey();
 
     /**
      * Sets the key used to access the Tunnel Endpoint configuration from Open vSwitch
+     * @param providerMappingsKey provide mapping key
      */
-    public void setProviderMappingsKey(String providerMappingsKey);
+    void setProviderMappingsKey(String providerMappingsKey);
 
     /**
-     * Gets the default provider mapping
+     * @return Gets the default provider mapping
      */
-    public String getDefaultProviderMapping();
+    String getDefaultProviderMapping();
 
     /**
      * Sets the default provider mapping
+     * @param providerMapping provider mapping
      */
-    public void setDefaultProviderMapping(String providerMapping);
+    void setDefaultProviderMapping(String providerMapping);
 
     /**
      * Gets the tunnel endpoint address for a given Node
@@ -108,7 +112,7 @@ public interface ConfigurationService {
      * @return the tunnel endpoint
      * @see java.net.InetAddress
      */
-    public InetAddress getTunnelEndPoint(Node node);
+    InetAddress getTunnelEndPoint(Node node);
 
     /**
      * Returns the OpenFlow version to be used by the {@link NetworkingProvider}
@@ -116,7 +120,19 @@ public interface ConfigurationService {
      * @param node the node to query
      * @return the OpenFlow version to use
      */
-    public String getOpenflowVersion(Node node);
+    String getOpenflowVersion(Node node);
+
+    /**
+     * Determine if L3 forwarding is enabled
+     * @return true if ovsdb net-virt is configured to perform L3 forwarding
+     */
+    boolean isL3ForwardingEnabled();
+
+    /**
+     * Determine if Distributed ARP Responder is enabled
+     * @return true if ovsdb net-virt is configured for distributed arp responder
+     */
+    boolean isDistributedArpDisabled();
 
     /**
      * Returns the MacAddress to be used for the default gateway by the {@link L3ForwardingProvider}
@@ -124,5 +140,7 @@ public interface ConfigurationService {
      * @param node the node to query
      * @return the MacAddress to use for the default gateway; or null if none is configured.
      */
-    public String getDefaultGatewayMacAddress(Node node);
+    String getDefaultGatewayMacAddress(Node node);
+
+    boolean isUserSpaceEnabled();
 }