Merge "Introduce ASYNC caches and use them in FRM"
authorAlessandro Boch <aboch@cisco.com>
Fri, 27 Sep 2013 00:47:33 +0000 (00:47 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 27 Sep 2013 00:47:33 +0000 (00:47 +0000)
92 files changed:
opendaylight/appauth/pom.xml
opendaylight/archetypes/odl-model-project/pom.xml
opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml
opendaylight/arphandler/pom.xml
opendaylight/clustering/services/pom.xml
opendaylight/clustering/services_implementation/pom.xml
opendaylight/clustering/services_implementation/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java
opendaylight/clustering/stub/pom.xml
opendaylight/clustering/test/pom.xml
opendaylight/commons/concepts/pom.xml
opendaylight/commons/opendaylight/pom.xml
opendaylight/configuration/api/pom.xml
opendaylight/configuration/implementation/pom.xml
opendaylight/connectionmanager/api/pom.xml
opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/IConnectionManager.java
opendaylight/connectionmanager/implementation/pom.xml
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/internal/ConnectionManager.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java
opendaylight/containermanager/api/pom.xml
opendaylight/containermanager/implementation/pom.xml
opendaylight/containermanager/it.implementation/pom.xml
opendaylight/forwarding/staticrouting/pom.xml
opendaylight/forwardingrulesmanager/api/pom.xml
opendaylight/forwardingrulesmanager/implementation/pom.xml
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/FlowEntryDistributionOrderFutureTask.java
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java
opendaylight/hosttracker/api/pom.xml
opendaylight/hosttracker/implementation/pom.xml
opendaylight/hosttracker_new/api/pom.xml
opendaylight/hosttracker_new/implementation/pom.xml
opendaylight/logging/bridge/pom.xml
opendaylight/md-sal/model/model-flow-service/pom.xml
opendaylight/md-sal/model/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-compability/pom.xml
opendaylight/md-sal/sal-compability/src/main/java/org/opendaylight/controller/sal/compability/ToSalConversionsUtils.java
opendaylight/md-sal/sal-compability/src/test/java/org/opendaylight/controller/sal/compability/TestToSalConversionsUtils.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/implementation/pom.xml
opendaylight/networkconfiguration/neutron/pom.xml
opendaylight/northbound/bundlescanner/api/pom.xml
opendaylight/northbound/bundlescanner/implementation/pom.xml
opendaylight/northbound/commons/pom.xml
opendaylight/northbound/containermanager/pom.xml
opendaylight/northbound/flowprogrammer/pom.xml
opendaylight/northbound/hosttracker/pom.xml
opendaylight/northbound/networkconfiguration/bridgedomain/pom.xml
opendaylight/northbound/networkconfiguration/neutron/pom.xml
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworksNorthbound.java
opendaylight/northbound/staticrouting/pom.xml
opendaylight/northbound/statistics/pom.xml
opendaylight/northbound/subnets/pom.xml
opendaylight/northbound/switchmanager/pom.xml
opendaylight/northbound/topology/pom.xml
opendaylight/northboundtest/unit_test_suite/pom.xml
opendaylight/protocol_plugins/openflow/pom.xml
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6StatsReply.java
opendaylight/protocol_plugins/stub/pom.xml
opendaylight/routing/dijkstra_implementation/pom.xml
opendaylight/sal/api/pom.xml
opendaylight/sal/connection/api/pom.xml
opendaylight/sal/connection/api/src/main/java/org/opendaylight/controller/sal/connection/ConnectionLocality.java [moved from opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/ConnectionLocality.java with 93% similarity]
opendaylight/sal/connection/api/src/main/java/org/opendaylight/controller/sal/connection/IPluginOutConnectionService.java
opendaylight/sal/connection/implementation/pom.xml
opendaylight/sal/connection/implementation/src/main/java/org/opendaylight/controller/sal/connection/implementation/internal/ConnectionService.java
opendaylight/sal/implementation/pom.xml
opendaylight/sal/networkconfiguration/api/pom.xml
opendaylight/sal/networkconfiguration/implementation/pom.xml
opendaylight/samples/loadbalancer/pom.xml
opendaylight/samples/northbound/loadbalancer/pom.xml
opendaylight/samples/simpleforwarding/pom.xml
opendaylight/security/pom.xml
opendaylight/statisticsmanager/api/pom.xml
opendaylight/statisticsmanager/implementation/pom.xml
opendaylight/switchmanager/api/pom.xml
opendaylight/switchmanager/implementation/pom.xml
opendaylight/topologymanager/implementation/pom.xml
opendaylight/usermanager/api/pom.xml
opendaylight/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/UserConfig.java
opendaylight/usermanager/api/src/test/java/org/opendaylight/controller/usermanager/AuthorizationUserConfigTest.java
opendaylight/usermanager/implementation/pom.xml
opendaylight/web/brandfragment/pom.xml
opendaylight/web/devices/pom.xml
opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java
opendaylight/web/devices/src/main/resources/js/page.js
opendaylight/web/flows/pom.xml
opendaylight/web/flows/src/main/resources/js/page.js
opendaylight/web/root/pom.xml
opendaylight/web/topology/pom.xml
opendaylight/web/troubleshoot/pom.xml
third-party/org.apache.catalina.filters.CorsFilter/pom.xml

index 71aa49f0f2402cb337f9fc3c3ec8cf4abe44b1cc..4f9cf4c17dce24bd158375bee1ea35a09e8246aa 100644 (file)
@@ -22,7 +22,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>2.3.6</version>
+                <version>${bundle.plugin.version}</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
index eb81614983f6da8fbab0201295e3fb91c906b173..9d05405380bd22c05b8ed230e328e31919ec8e08 100644 (file)
@@ -8,6 +8,11 @@
   <packaging>maven-archetype</packaging>\r
 \r
   <name>odl-model-project</name>\r
+  <scm>\r
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>\r
+  </scm>\r
 \r
   <build>\r
     <extensions>\r
index b60dee7c417c1cdbd766f8b9d1a96febb88c6562..e592e6df8ef549a86f4bf2c994d2585082664bb6 100644 (file)
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
     <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
     <yang.version>0.5.8-SNAPSHOT</yang.version>\r
-    <maven.bundle.version>2.4.0</maven.bundle.version>\r
+    <bundle.plugin.version>2.3.7</bundle.plugin.version>\r
   </properties>\r
+  <scm>\r
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>\r
+  </scm>\r
 \r
   <build>\r
     <plugins>\r
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>${maven.bundle.version}</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index c58ddd2f21404f21d584cc15e06a68d5ae860a50..e3beb8061d585c54ecac76fb174e948791fd54b8 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index d251d454250d84ed302c75ffd16d43d178e51e37..59df46b36e16e1e7f50205094194f571a3682afa 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index fddaa6c9dc7e657f51576f5f1ed209a0409fe47a..9606bdc019b561de5aed00c0eb4fb342da693f48 100644 (file)
@@ -38,7 +38,7 @@
     <plugin>
       <groupId>org.apache.felix</groupId>
       <artifactId>maven-bundle-plugin</artifactId>
-      <version>2.3.6</version>
+      <version>${bundle.plugin.version}</version>
       <extensions>true</extensions>
       <configuration>
         <instructions>
index e10563797da69cd6bd37a336d54c0294f6f1d4ec..6c6715d2207e380d1d66c0bc30bd274cb8bbc1a0 100644 (file)
@@ -134,9 +134,9 @@ public abstract class BaseDistributionInterceptor extends ClusteringInterceptor
                 rpcManager.invokeRemotely(recipientGenerator.generateRecipients(), command,
                         rpcManager.getDefaultRpcOptions(isSync));
             } else {
-                log.errorf("Didn't invoke RPC because primaryOwner (%s) didn't match this node (%s)", primaryOwner,
+                log.tracef("Didn't invoke RPC because primaryOwner (%s) didn't match this node (%s)", primaryOwner,
                            rpcManager.getAddress());
-                log.errorf("Hashcode is (%s) for Key (%s) .. it could be inconsistent in the cluster!",
+                log.tracef("Hashcode is (%s) for Key (%s)",
                            command.getKey().hashCode(), command.getKey());
             }
          return returnValue;
index b3c49851f62b2a3bb11bacc5683fce0aa8a81174..3cc7d7baac72a8893ebf2ace01d3f2d4b25bc4f8 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 0b09f41de54fb987300f797086796d18f65852ef..340a6c771ff3a590351960ed80bd9368e370123d 100644 (file)
@@ -22,7 +22,7 @@
     <plugin>
       <groupId>org.apache.felix</groupId>
       <artifactId>maven-bundle-plugin</artifactId>
-      <version>2.3.6</version>
+      <version>${bundle.plugin.version}</version>
       <extensions>true</extensions>
       <configuration>
         <instructions>
index ab351dbdc5936598e9dc5f17d5b93ff885fefb5c..22555271e1dcb24be484574afbbb87039f487d17 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index 042bc54928a8def322a80c866d61682faed5656b..abda95aee53a19a70fcb30870d30d056574daa8b 100644 (file)
@@ -58,6 +58,7 @@
     <commons.lang.version>3.1</commons.lang.version>
     <jacoco.version>0.5.3.201107060350</jacoco.version>
     <enforcer.version>1.3.1</enforcer.version>
+    <bundle.plugin.version>2.3.7</bundle.plugin.version>
   </properties>
 
   <pluginRepositories>
index bef02e4e2935ea5de845c1f501099fbc140ce2a9..68fae6417ca2e50917bd96f5805c45fa160521f6 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index c656ce1d6c65831eecd193ac2771fb1bd0a173ef..66473e262fb3f185551827ed1f1ef19936309143 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 4cc14b3d38cefbe69c4c1386e73a06c74208e72b..7029f49c0c6ce09891dad1883e8f7cf3b9dd57b5 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 788af16248ccd62c8cc0760dbcb20134983b3cac..106d14dc39abd69a718c7634a9639a2ec9374519 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.utils.Status;
 
index 5df2b0b26d2542b36e8f950ec43d5b04cf7f02f5..5571d944cab9de853c772b7023a733870b599c12 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 2d5f80fb79f99365544680e77df45cb779f897d9..1beb7fe0bb609860865ed52347f27bfe126aeb2e 100644 (file)
@@ -35,12 +35,12 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
 import org.opendaylight.controller.clustering.services.ICoordinatorChangeAware;
-import org.opendaylight.controller.connectionmanager.ConnectionLocality;
 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
 import org.opendaylight.controller.connectionmanager.IConnectionManager;
 import org.opendaylight.controller.connectionmanager.scheme.AbstractScheme;
 import org.opendaylight.controller.connectionmanager.scheme.SchemeFactory;
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.connection.IConnectionListener;
 import org.opendaylight.controller.sal.connection.IConnectionService;
 import org.opendaylight.controller.sal.core.Node;
index 062fd1ee777564aa1a90863e3826ef7648e12454..d7b1968429c7de4fb0053b76b8dc135984fc69e3 100644 (file)
@@ -14,8 +14,8 @@ import org.opendaylight.controller.clustering.services.CacheConfigException;
 import org.opendaylight.controller.clustering.services.CacheExistException;
 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
 import org.opendaylight.controller.clustering.services.IClusterServices;
-import org.opendaylight.controller.connectionmanager.ConnectionLocality;
 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.utils.Status;
 import org.opendaylight.controller.sal.utils.StatusCode;
index 2b207aa797aa76be72d20e3cc5e108aa20c03e98..891c44dfd016c70b5acbc295e6c7cbb20a408734 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 5af8e2265c94dccc540bf430b961ddcad906bca1..7900ce8901bc668a99d55c34d1546fc622a50522 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index ba71dbfdfeea151debce1497dd3f2740556845b3..805f2a75310169a029135787f67392f1bf0edb0b 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 458914807cb478480b76e0c595592c69431dcf7d..2304e6be5d80be849ad7c175088910bee9223c00 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 73ba8b95b09660928032644e961136c94642f8f1..253906e9c1f5ecfd25b34b3bed0f2d2db6a32283 100644 (file)
@@ -24,7 +24,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index d146eead6f0168e7e25cdd290459fb5ff20be7d2..e7faf735841441c67112042106c9b1eb6b13cfc4 100644 (file)
@@ -41,7 +41,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
@@ -62,6 +62,7 @@
               org.opendaylight.controller.sal.match,
               org.opendaylight.controller.sal.utils,
               org.opendaylight.controller.sal.packet,
+              org.opendaylight.controller.sal.connection,
               org.opendaylight.controller.forwardingrulesmanager,
               org.opendaylight.controller.connectionmanager,
               javax.xml.bind.annotation,
       <artifactId>sal</artifactId>
       <version>0.5.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal.connection</artifactId>
+      <version>0.1.0-SNAPSHOT</version>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>forwardingrulesmanager</artifactId>
index a51409fc2d241b61f2180b20841a942cf5e2ca36..b8c2d1db55067b9fc880ccfa74d352a0a45965a0 100644 (file)
@@ -65,6 +65,12 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
 
     @Override
     public boolean cancel(boolean mayInterruptIfRunning) {
+        if (this.waitingLatch.getCount() != 0L) {
+            this.retStatus = new Status(StatusCode.GONE);
+            this.waitingLatch.countDown();
+            logger.trace("Cancelled the workOrder");
+            return true;
+        }
         return false;
     }
 
@@ -87,7 +93,8 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
             // Return the known status
             return retStatus;
         } else {
-            logger.error("Timing out, the workStatus for order {} has not come back in time!", this.order);
+            logger.error("Timing out, the workStatus for order {} has not come back in time!, it's hashcode is {}",
+                    this.order, this.order.hashCode());
             return new Status(StatusCode.TIMEOUT);
         }
     }
index c58410c668ca3a7d72ee80d020c8a251dd761407..3c918ec0e1c5dac1bf503737cd88c8681a61c77a 100644 (file)
@@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
 import java.util.concurrent.LinkedBlockingQueue;
 
 import org.eclipse.osgi.framework.console.CommandInterpreter;
@@ -39,7 +38,7 @@ import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
 import org.opendaylight.controller.clustering.services.IClusterContainerServices;
 import org.opendaylight.controller.clustering.services.IClusterServices;
 import org.opendaylight.controller.configuration.IConfigurationContainerAware;
-import org.opendaylight.controller.connectionmanager.ConnectionLocality;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.connectionmanager.IConnectionManager;
 import org.opendaylight.controller.forwardingrulesmanager.FlowConfig;
 import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
@@ -783,6 +782,16 @@ public class ForwardingRulesManager implements
         return true;
     }
 
+    private ConcurrentMap.Entry<Integer, FlowConfig> getStaticFlowEntry(String name, Node node) {
+        for (ConcurrentMap.Entry<Integer, FlowConfig> flowEntry : staticFlows.entrySet()) {
+            FlowConfig flowConfig = flowEntry.getValue();
+            if (flowConfig.isByNameAndNodeIdEqual(name, node)) {
+                return flowEntry;
+            }
+        }
+        return null;
+    }
+
     private void updateLocalDatabase(FlowEntryInstall entry, boolean add) {
         // Update the software view
         updateSwViewes(entry, add);
@@ -1876,7 +1885,9 @@ public class ForwardingRulesManager implements
      * If requested, a copy of each original flow entry will be stored in the
      * inactive list so that it can be re-applied when needed (This is typically
      * the case when running in the default container and controller moved to
-     * container mode)
+     * container mode) NOTE WELL: The routine as long as does a bulk change will
+     * operate only on the entries for nodes locally attached so to avoid
+     * redundant operations initiated by multiple nodes
      *
      * @param preserveFlowEntries
      *            if true, a copy of each original entry is stored in the
@@ -1902,9 +1913,15 @@ public class ForwardingRulesManager implements
 
         // Now remove the entries
         for (FlowEntryInstall flowEntryHw : toRemove) {
-            Status status = this.removeEntryInternal(flowEntryHw, false);
-            if (!status.isSuccess()) {
-                log.warn("Failed to remove entry: {}. The failure is: {}", flowEntryHw, status.getDescription());
+            Node n = flowEntryHw.getNode();
+            if (n != null && connectionManager.getLocalityStatus(n) == ConnectionLocality.LOCAL) {
+                Status status = this.removeEntryInternal(flowEntryHw, false);
+                if (!status.isSuccess()) {
+                    log.warn("Failed to remove entry: {}. The failure is: {}", flowEntryHw, status.getDescription());
+                }
+            } else {
+                log.debug("Not removing entry {} because not connected locally, the remote guy will do it's job",
+                        flowEntryHw);
             }
         }
     }
@@ -1947,10 +1964,9 @@ public class ForwardingRulesManager implements
 
     @Override
     public FlowConfig getStaticFlow(String name, Node node) {
-        for (ConcurrentMap.Entry<Integer, FlowConfig> entry : staticFlows.entrySet()) {
-            if (entry.getValue().isByNameAndNodeIdEqual(name, node)) {
-                return entry.getValue();
-            }
+        ConcurrentMap.Entry<Integer, FlowConfig> entry = getStaticFlowEntry(name, node);
+        if(entry != null) {
+            return entry.getValue();
         }
         return null;
     }
@@ -2641,6 +2657,12 @@ public class ForwardingRulesManager implements
         uninstallAllFlowEntries(false);
         // Shutdown executor
         this.executor.shutdownNow();
+        // Now walk all the workMonitor and wake up the one sleeping because
+        // destruction is happening
+        for (FlowEntryDistributionOrder fe : workMonitor.keySet()) {
+            FlowEntryDistributionOrderFutureTask task = workMonitor.get(fe);
+            task.cancel(true);
+        }
     }
 
     public void setFlowProgrammerService(IFlowProgrammerService service) {
@@ -3032,6 +3054,36 @@ public class ForwardingRulesManager implements
         }
     }
 
+    public void _frmProcessErrorEvent(CommandInterpreter ci) throws UnknownHostException {
+        Node node = null;
+        long reqId = 0L;
+        String nodeId = ci.nextArgument();
+        if (nodeId == null) {
+            ci.print("Node id not specified");
+            return;
+        }
+        String requestId = ci.nextArgument();
+        if (requestId == null) {
+            ci.print("Request id not specified");
+            return;
+        }
+        try {
+            node = NodeCreator.createOFNode(Long.valueOf(nodeId));
+        } catch (NumberFormatException e) {
+            ci.print("Node id not a number");
+            return;
+        }
+        try {
+            reqId = Long.parseLong(requestId);
+        } catch (NumberFormatException e) {
+            ci.print("Request id not a number");
+            return;
+        }
+        // null for error object is good enough for now
+        ErrorReportedEvent event = new ErrorReportedEvent(reqId, node, null);
+        this.processErrorEvent(event);
+    }
+
     @Override
     public void flowRemoved(Node node, Flow flow) {
         log.trace("Received flow removed notification on {} for {}", node, flow);
@@ -3101,6 +3153,15 @@ public class ForwardingRulesManager implements
         if (target != null) {
             // This was a flow install, update database
             this.updateLocalDatabase(target, false);
+            // also update the config
+            if(FlowConfig.STATICFLOWGROUP.equals(target.getGroupName())) {
+                ConcurrentMap.Entry<Integer, FlowConfig> staticFlowEntry = getStaticFlowEntry(target.getFlowName(),target.getNode());
+                // staticFlowEntry should never be null.
+                // the null check is just an extra defensive check.
+                if(staticFlowEntry != null) {
+                    staticFlows.remove(staticFlowEntry.getKey());
+                }
+            }
         }
 
         // Notify listeners
index 49a3ff5d9284fe1ef9149b5a6a98a09f41677581..322792d089b997d67f36fc138468afe0d77fad9c 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index e93559b42ccae19ac461607d5680b4a3db1e0ec6..3e7a1df325348e9c1ca6a762d338c93a054a6bbe 100644 (file)
@@ -41,7 +41,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 72b671c0d284f25438fddcc42787275153652856..f93b8041665c672524395d7c63f52c4558e4a215 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index dfc2955cfd9679f8c7f3eca2ca4fb60fcf5ef2c5..85f3ca857b31d5b89d2078d3abe3780944b8663b 100644 (file)
@@ -41,7 +41,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index a6c4a7cd3ed1b0e598176c76d4d80a94f8140f88..664415e9b798364cfaab73cc3ac6d4ffa0707bac 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 18b338b544dc09c23fb0376223e01e26a343844a..583a7ac0106205b6ddb131e4e6d4e74e3dfd8347 100644 (file)
@@ -6,6 +6,11 @@
         <groupId>org.opendaylight.controller.model</groupId>
         <version>1.0-SNAPSHOT</version>
     </parent>
+    <scm>
+      <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+      <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
+    </scm>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>model-flow-service</artifactId>
@@ -28,4 +33,4 @@
         </dependency>
     </dependencies>
     <packaging>bundle</packaging>
-</project>
\ No newline at end of file
+</project>
index 2874122ac1613d7734b7b71291dad7b6f24af924..f7d9241c93a0ae694946758d868bc5cedddab739 100644 (file)
@@ -21,7 +21,7 @@
     <properties>
         <yang.version>0.5.7-SNAPSHOT</yang.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.bundle.version>2.4.0</maven.bundle.version>
+        <bundle.plugin.version>2.3.7</bundle.plugin.version>
     </properties>
 
     <modules>
@@ -37,7 +37,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>${maven.bundle.version}</version>
+                <version>${bundle.plugin.version}</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
index bf1b95decf22abaf3620c6bff3be25b14037bfbb..33ec9999d680d8177a35cdce0a250358368a9f04 100644 (file)
@@ -34,7 +34,7 @@
                <slf4j.version>1.7.2</slf4j.version>
                <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
                <yang.version>0.5.8-SNAPSHOT</yang.version>
-               <maven.bundle.version>2.4.0</maven.bundle.version>
+               <bundle.plugin.version>2.3.7</bundle.plugin.version>
         <releaseplugin.version>2.3.2</releaseplugin.version>
         <guava.version>14.0.1</guava.version>
         <osgi.core.version>5.0.0</osgi.core.version>
                        <plugin>
                                <groupId>org.apache.felix</groupId>
                                <artifactId>maven-bundle-plugin</artifactId>
-                               <version>${maven.bundle.version}</version>
+                               <version>${bundle.plugin.version}</version>
                                <extensions>true</extensions>
                                <configuration>
                                        <instructions>
index 8e06c9d71e426589ddf78b6df93322b024275153..29ba03be625399c45d7af52ed631e31dfc9abc20 100644 (file)
@@ -19,6 +19,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>${bundle.plugin.version}</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
index 40301a379fe404463adae6e65987fb4260dcbdd9..edb3b19f0c9b4da2960fb744368a898d194a4d51 100644 (file)
@@ -7,6 +7,11 @@
                <version>1.0-SNAPSHOT</version>
        </parent>
        <artifactId>sal-compability</artifactId>
+    <scm>
+      <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+      <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
+    </scm>
 
        <dependencies>
                <dependency>
index ad1a2f93872df143a84ffbfe338d7f8d11649ae9..793ac4988842e817292418db3b1d3a6237e5520a 100644 (file)
@@ -13,6 +13,7 @@ import static org.opendaylight.controller.sal.match.MatchType.TP_DST;
 import static org.opendaylight.controller.sal.match.MatchType.TP_SRC;
 
 import java.net.InetAddress;
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -73,159 +74,155 @@ public class ToSalConversionsUtils {
 
         List<Action> actions = source.getAction();
         if (actions != null) {
-            for (Action sourceAction : actions) {
-                Set<org.opendaylight.controller.sal.action.Action> targetActions = actionFrom(sourceAction);
-                for (org.opendaylight.controller.sal.action.Action targetAction : targetActions) {
-                    target.addAction(targetAction);
-                }
-            }
+            target.setActions(actionFrom(actions));
         }
 
         target.setId(source.getCookie().longValue());
         return target;
     }
 
-    public static Set<org.opendaylight.controller.sal.action.Action> actionFrom(Action source) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.Action sourceAction = source
-                .getAction();
-        Set<org.opendaylight.controller.sal.action.Action> targetAction = new HashSet<>();
-        if (sourceAction instanceof ControllerAction) {
-            targetAction.add(new Controller());
-        } else if (sourceAction instanceof OutputAction) {
-
-            List<Uri> nodeConnectors = ((OutputAction) sourceAction).getOutputNodeConnector();
-            for (Uri uri : nodeConnectors) {
-                targetAction.add(new Output(fromNodeConnectorRef(uri)));
-            }
-        } else if (sourceAction instanceof PopMplsAction) {
-            // TODO: define maping
-        } else if (sourceAction instanceof PushMplsAction) {
-            // TODO: define maping
-        } else if (sourceAction instanceof PushPbbAction) {
-            // TODO: define maping
-        } else if (sourceAction instanceof PushVlanAction) {
-            // TODO: define maping
-            // PushVlanAction vlanAction = (PushVlanAction) sourceAction;
-            // targetAction.add(new PushVlan(vlanAction., pcp, cfi, vlanId);
-        } else if (sourceAction instanceof SetMplsTtlAction) {
-            // TODO: define maping
-            // targetAction = //no action to map
-        } else if (sourceAction instanceof SetNwTtlAction) {
-            // TODO: define maping
-        } else if (sourceAction instanceof SetQueueAction) {
-            // TODO: define maping
-            // targetAction = //no action to map
-        } else if (sourceAction instanceof DropAction) {
-            targetAction.add(new Drop());
-        } else if (sourceAction instanceof FloodAction) {
-            targetAction.add(new Flood());
-        } else if (sourceAction instanceof FloodAllAction) {
-            targetAction.add(new FloodAll());
-        } else if (sourceAction instanceof HwPathAction) {
-            targetAction.add(new HwPath());
-        } else if (sourceAction instanceof LoopbackAction) {
-            targetAction.add(new Loopback());
-        } else if (sourceAction instanceof PopVlanAction) {
-            targetAction.add(new PopVlan());
-        } else if (sourceAction instanceof PushVlanAction) {
-            PushVlanAction pushVlanAction = (PushVlanAction) sourceAction;
-            PushVlan pushVlan = pushVlanFrom(pushVlanAction);
-            if (pushVlan != null) {
-                targetAction.add(pushVlan);
-            }
-        } else if (sourceAction instanceof SetDlDstAction) {
-            MacAddress addressL2Dest = ((SetDlDstAction) sourceAction).getAddress();
-            if (addressL2Dest != null) {
-                String addressValue = addressL2Dest.getValue();
-                if (addressValue != null) {
-                    targetAction.add(new SetDlDst(addressValue.getBytes()));
+    public static List<org.opendaylight.controller.sal.action.Action> actionFrom(List<Action> actions) {
+        List<org.opendaylight.controller.sal.action.Action> targetAction = new ArrayList<>();
+        for (Action action : actions) {
+            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.Action sourceAction = action
+                    .getAction();
+
+            if (sourceAction instanceof ControllerAction) {
+                targetAction.add(new Controller());
+            } else if (sourceAction instanceof OutputAction) {
+
+                List<Uri> nodeConnectors = ((OutputAction) sourceAction).getOutputNodeConnector();
+                if (nodeConnectors != null) {
+                    for (Uri uri : nodeConnectors) {
+                        targetAction.add(new Output(fromNodeConnectorRef(uri)));
+                    }
                 }
-            }
-        } else if (sourceAction instanceof SetDlSrcAction) {
-            MacAddress addressL2Src = ((SetDlSrcAction) sourceAction).getAddress();
-            if (addressL2Src != null) {
-                String addressValue = addressL2Src.getValue();
-                if (addressValue != null) {
-                    targetAction.add(new SetDlSrc(addressValue.getBytes()));
+            } else if (sourceAction instanceof PopMplsAction) {
+                // TODO: define maping
+            } else if (sourceAction instanceof PushMplsAction) {
+                // TODO: define maping
+            } else if (sourceAction instanceof PushPbbAction) {
+                // TODO: define maping
+            } else if (sourceAction instanceof SetMplsTtlAction) {
+                // TODO: define maping
+                // targetAction = //no action to map
+            } else if (sourceAction instanceof SetNwTtlAction) {
+                // TODO: define maping
+            } else if (sourceAction instanceof SetQueueAction) {
+                // TODO: define maping
+                // targetAction = //no action to map
+            } else if (sourceAction instanceof DropAction) {
+                targetAction.add(new Drop());
+            } else if (sourceAction instanceof FloodAction) {
+                targetAction.add(new Flood());
+            } else if (sourceAction instanceof FloodAllAction) {
+                targetAction.add(new FloodAll());
+            } else if (sourceAction instanceof HwPathAction) {
+                targetAction.add(new HwPath());
+            } else if (sourceAction instanceof LoopbackAction) {
+                targetAction.add(new Loopback());
+            } else if (sourceAction instanceof PopVlanAction) {
+                targetAction.add(new PopVlan());
+            } else if (sourceAction instanceof PushVlanAction) {
+                PushVlanAction pushVlanAction = (PushVlanAction) sourceAction;
+                PushVlan pushVlan = pushVlanFrom(pushVlanAction);
+                if (pushVlan != null) {
+                    targetAction.add(pushVlan);
                 }
-            }
-        } else if (sourceAction instanceof SetDlTypeAction) {
-            EtherType dlType = ((SetDlTypeAction) sourceAction).getDlType();
-            if (dlType != null) {
-                Long dlTypeValue = dlType.getValue();
-                if (dlTypeValue != null) {
-                    targetAction.add(new SetDlType(dlTypeValue.intValue()));
+            } else if (sourceAction instanceof SetDlDstAction) {
+                MacAddress addressL2Dest = ((SetDlDstAction) sourceAction).getAddress();
+                if (addressL2Dest != null) {
+                    String addressValue = addressL2Dest.getValue();
+                    if (addressValue != null) {
+                        targetAction.add(new SetDlDst(addressValue.getBytes()));
+                    }
                 }
-            }
-        } else if (sourceAction instanceof SetNextHopAction) {
-            Address addressL3 = ((SetNextHopAction) sourceAction).getAddress();
+            } else if (sourceAction instanceof SetDlSrcAction) {
+                MacAddress addressL2Src = ((SetDlSrcAction) sourceAction).getAddress();
+                if (addressL2Src != null) {
+                    String addressValue = addressL2Src.getValue();
+                    if (addressValue != null) {
+                        targetAction.add(new SetDlSrc(addressValue.getBytes()));
+                    }
+                }
+            } else if (sourceAction instanceof SetDlTypeAction) {
+                EtherType dlType = ((SetDlTypeAction) sourceAction).getDlType();
+                if (dlType != null) {
+                    Long dlTypeValue = dlType.getValue();
+                    if (dlTypeValue != null) {
+                        targetAction.add(new SetDlType(dlTypeValue.intValue()));
+                    }
+                }
+            } else if (sourceAction instanceof SetNextHopAction) {
+                Address addressL3 = ((SetNextHopAction) sourceAction).getAddress();
 
-            InetAddress inetAddress = inetAddressFrom(addressL3);
-            if (inetAddress != null) {
-                targetAction.add(new SetNextHop(inetAddress));
-            }
-        } else if (sourceAction instanceof SetNwDstAction) {
-            Address addressL3 = ((SetNwDstAction) sourceAction).getAddress();
+                InetAddress inetAddress = inetAddressFrom(addressL3);
+                if (inetAddress != null) {
+                    targetAction.add(new SetNextHop(inetAddress));
+                }
+            } else if (sourceAction instanceof SetNwDstAction) {
+                Address addressL3 = ((SetNwDstAction) sourceAction).getAddress();
 
-            InetAddress inetAddress = inetAddressFrom(addressL3);
-            if (inetAddress != null) {
-                targetAction.add(new SetNwDst(inetAddress));
-            }
-        } else if (sourceAction instanceof SetNwSrcAction) {
-            Address addressL3 = ((SetNwDstAction) sourceAction).getAddress();
+                InetAddress inetAddress = inetAddressFrom(addressL3);
+                if (inetAddress != null) {
+                    targetAction.add(new SetNwDst(inetAddress));
+                }
+            } else if (sourceAction instanceof SetNwSrcAction) {
+                Address addressL3 = ((SetNwSrcAction) sourceAction).getAddress();
 
-            InetAddress inetAddress = inetAddressFrom(addressL3);
-            if (inetAddress != null) {
-                targetAction.add(new SetNwSrc(inetAddress));
-            }
-        } else if (sourceAction instanceof SetNwTosAction) {
-            Integer tos = ((SetNwTosAction) sourceAction).getTos();
-            if (tos != null) {
-                targetAction.add(new SetNwTos(tos));
-            }
-        } else if (sourceAction instanceof SetTpDstAction) {
-            PortNumber port = ((SetTpDstAction) sourceAction).getPort();
-            if (port != null) {
-                Integer portValue = port.getValue();
-                if (port.getValue() != null) {
-                    targetAction.add(new SetTpDst(portValue));
+                InetAddress inetAddress = inetAddressFrom(addressL3);
+                if (inetAddress != null) {
+                    targetAction.add(new SetNwSrc(inetAddress));
                 }
-            }
-        } else if (sourceAction instanceof SetTpSrcAction) {
-            PortNumber port = ((SetTpSrcAction) sourceAction).getPort();
-            if (port != null) {
-                Integer portValue = port.getValue();
-                if (port.getValue() != null) {
-                    targetAction.add(new SetTpSrc(portValue));
+            } else if (sourceAction instanceof SetNwTosAction) {
+                Integer tos = ((SetNwTosAction) sourceAction).getTos();
+                if (tos != null) {
+                    targetAction.add(new SetNwTos(tos));
                 }
-            }
-        } else if (sourceAction instanceof SetVlanCfiAction) {
-            VlanCfi vlanCfi = ((SetVlanCfiAction) sourceAction).getVlanCfi();
-            if (vlanCfi != null) {
-                Integer vlanCfiValue = vlanCfi.getValue();
-                if (vlanCfiValue != null) {
-                    targetAction.add(new SetVlanCfi(vlanCfiValue));
+            } else if (sourceAction instanceof SetTpDstAction) {
+                PortNumber port = ((SetTpDstAction) sourceAction).getPort();
+                if (port != null) {
+                    Integer portValue = port.getValue();
+                    if (port.getValue() != null) {
+                        targetAction.add(new SetTpDst(portValue));
+                    }
                 }
-            }
-        } else if (sourceAction instanceof SetVlanIdAction) {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanID = ((SetVlanIdAction) sourceAction)
-                    .getVlanId();
-            if (vlanID != null) {
-                Integer vlanIdValue = vlanID.getValue();
-                if (vlanIdValue != null) {
-                    targetAction.add(new SetVlanId(vlanIdValue));
+            } else if (sourceAction instanceof SetTpSrcAction) {
+                PortNumber port = ((SetTpSrcAction) sourceAction).getPort();
+                if (port != null) {
+                    Integer portValue = port.getValue();
+                    if (port.getValue() != null) {
+                        targetAction.add(new SetTpSrc(portValue));
+                    }
                 }
-            }
-        } else if (sourceAction instanceof SetVlanPcpAction) {
-            VlanPcp vlanPcp = ((SetVlanPcpAction) sourceAction).getVlanPcp();
-            if (vlanPcp != null) {
-                Short vlanPcpValue = vlanPcp.getValue();
-                if (vlanPcpValue != null) {
-                    targetAction.add(new SetVlanPcp(vlanPcpValue));
+            } else if (sourceAction instanceof SetVlanCfiAction) {
+                VlanCfi vlanCfi = ((SetVlanCfiAction) sourceAction).getVlanCfi();
+                if (vlanCfi != null) {
+                    Integer vlanCfiValue = vlanCfi.getValue();
+                    if (vlanCfiValue != null) {
+                        targetAction.add(new SetVlanCfi(vlanCfiValue));
+                    }
+                }
+            } else if (sourceAction instanceof SetVlanIdAction) {
+                org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanID = ((SetVlanIdAction) sourceAction)
+                        .getVlanId();
+                if (vlanID != null) {
+                    Integer vlanIdValue = vlanID.getValue();
+                    if (vlanIdValue != null) {
+                        targetAction.add(new SetVlanId(vlanIdValue));
+                    }
+                }
+            } else if (sourceAction instanceof SetVlanPcpAction) {
+                VlanPcp vlanPcp = ((SetVlanPcpAction) sourceAction).getVlanPcp();
+                if (vlanPcp != null) {
+                    Short vlanPcpValue = vlanPcp.getValue();
+                    if (vlanPcpValue != null) {
+                        targetAction.add(new SetVlanPcp(vlanPcpValue));
+                    }
                 }
+            } else if (sourceAction instanceof SwPathAction) {
+                targetAction.add(new SwPath());
             }
-        } else if (sourceAction instanceof SwPathAction) {
-            targetAction.add(new SwPath());
         }
 
         return targetAction;
diff --git a/opendaylight/md-sal/sal-compability/src/test/java/org/opendaylight/controller/sal/compability/TestToSalConversionsUtils.java b/opendaylight/md-sal/sal-compability/src/test/java/org/opendaylight/controller/sal/compability/TestToSalConversionsUtils.java
new file mode 100644 (file)
index 0000000..33af3a1
--- /dev/null
@@ -0,0 +1,341 @@
+package org.opendaylight.controller.sal.compability;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigInteger;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.opendaylight.controller.sal.action.*;
+import org.opendaylight.controller.sal.flowprogrammer.Flow;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAddedBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeFlow;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.VlanCfi;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv4Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv6Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.Action;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.ActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.MatchBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.EthernetMatchBuilder;
+
+import com.google.common.net.InetAddresses;
+
+public class TestToSalConversionsUtils {
+    // prefix:
+    // od|Od = Open Daylight
+
+    @Test
+    public void testToSalConversion() {
+        Flow salFlow = ToSalConversionsUtils.flowFrom(prepareOdFlow());
+        checkSalFlow(salFlow);
+    }
+
+    private void checkSalFlow(Flow salFlow) {
+        assertTrue("Id value is incorrect.", salFlow.getId() == 9223372036854775807L);
+        assertTrue("Hard timeout is incorrect.", salFlow.getHardTimeout() == 32767);
+        assertTrue("Iddle timeout is incorrect.", salFlow.getIdleTimeout() == 32767);
+        assertTrue("Priority value is incorrect.", salFlow.getPriority() == 32767);
+
+        checkSalActions(salFlow.getActions());
+    }
+
+    private void checkSalActions(List<org.opendaylight.controller.sal.action.Action> actions) {
+        checkSalAction(actions, Flood.class, 1);
+        checkSalAction(actions, FloodAll.class, 1);
+        checkSalAction(actions, HwPath.class, 1);
+        checkSalAction(actions, Loopback.class, 1);
+        checkSalAction(actions, Output.class, 2, true);
+        checkSalAction(actions, PopVlan.class, 1);
+        checkSalAction(actions, PushVlan.class, 1, true);
+        checkSalAction(actions, SetDlDst.class, 1, true);
+        checkSalAction(actions, SetDlSrc.class, 1, true);
+        checkSalAction(actions, SetDlType.class, 1, true);
+        checkSalAction(actions, SetNextHop.class, 2, true);
+        checkSalAction(actions, SetNwDst.class, 2, true);
+        checkSalAction(actions, SetNwSrc.class, 2, true);
+        checkSalAction(actions, SetNwTos.class, 1, true);
+        checkSalAction(actions, SetTpDst.class, 1, true);
+        checkSalAction(actions, SetTpSrc.class, 1, true);
+        checkSalAction(actions, SetVlanCfi.class, 1, true);
+        checkSalAction(actions, SetVlanId.class, 1, true);
+        checkSalAction(actions, SetVlanPcp.class, 1, true);
+        checkSalAction(actions, SwPath.class, 1);
+    }
+
+    private void checkSalAction(List<org.opendaylight.controller.sal.action.Action> actions, Class<?> cls,
+            int numOfActions) {
+        checkSalAction(actions, cls, numOfActions, false);
+    }
+
+    private void checkSalAction(List<org.opendaylight.controller.sal.action.Action> actions, Class<?> cls,
+            int numOfActions, boolean additionalCheck) {
+        int numOfEqualClass = 0;
+        for (org.opendaylight.controller.sal.action.Action action : actions) {
+            if (action.getClass().equals(cls)) {
+                if (additionalCheck) {
+                    additionalActionCheck(action);
+                }
+                numOfEqualClass++;
+            }
+        }
+        assertEquals("Incorrect number of actions of type " + cls.getName() + " was found.", numOfActions,
+                numOfEqualClass);
+    }
+
+    // implement special checks
+    private void additionalActionCheck(org.opendaylight.controller.sal.action.Action action) {
+        if (action instanceof Output) {
+            // ((Output)action).getPort() //TODO finish check when mapping will
+            // be defined
+        } else if (action instanceof PushVlan) {
+            assertEquals("Wrong value for action PushVlan for tag.", 0x8100, ((PushVlan) action).getTag());
+            assertEquals("Wrong value for action PushVlan for pcp.", 7, ((PushVlan) action).getPcp());
+            assertEquals("Wrong value for action PushVlan for cfi.", 1, ((PushVlan) action).getCfi());
+            assertEquals("Wrong value for action PushVlan for vlanID.", 4095, ((PushVlan) action).getVlanId());
+        } else if (action instanceof SetDlDst) {
+            assertEquals("Wrong value for action SetDlDst for MAC address.", "3C:A9:F4:00:E0:C8", new String(
+                    ((SetDlDst) action).getDlAddress()));
+        } else if (action instanceof SetDlSrc) {
+            assertEquals("Wrong value for action SetDlSrc for MAC address.", "24:77:03:7C:C5:F1", new String(
+                    ((SetDlSrc) action).getDlAddress()));
+        } else if (action instanceof SetDlType) {
+            assertEquals("Wrong value for action SetDlType for.", 513l, ((SetDlType) action).getDlType());
+        } else if (action instanceof SetNextHop) {
+            InetAddress inetAddress = ((SetNextHop) action).getAddress();
+            checkIpAddresses(inetAddress, "192.168.100.100", "2001:db8:85a3::8a2e:370:7334");
+        } else if (action instanceof SetNwDst) {
+            InetAddress inetAddress = ((SetNwDst) action).getAddress();
+            checkIpAddresses(inetAddress, "192.168.100.101", "2001:db8:85a3::8a2e:370:7335");
+        } else if (action instanceof SetNwSrc) {
+            InetAddress inetAddress = ((SetNwSrc) action).getAddress();
+            checkIpAddresses(inetAddress, "192.168.100.102", "2001:db8:85a3::8a2e:370:7336");
+        } else if (action instanceof SetNwTos) {
+            assertEquals("Wrong value for action SetNwTos for tos.", 63, ((SetNwTos) action).getNwTos());
+        } else if (action instanceof SetTpDst) {
+            assertEquals("Wrong value for action SetTpDst for port.", 65535, ((SetTpDst) action).getPort());
+        } else if (action instanceof SetTpSrc) {
+            assertEquals("Wrong value for action SetTpSrc for port.", 65535, ((SetTpSrc) action).getPort());
+        } else if (action instanceof SetVlanCfi) {
+            assertEquals("Wrong value for action SetVlanCfi for port.", 1, ((SetVlanCfi) action).getCfi());
+        } else if (action instanceof SetVlanId) {
+            assertEquals("Wrong value for action SetVlanId for vlan ID.", 4095, ((SetVlanId) action).getVlanId());
+        } else if (action instanceof SetVlanPcp) {
+            assertEquals("Wrong value for action SetVlanPcp for vlan ID.", 7, ((SetVlanPcp) action).getPcp());
+        }
+    }
+
+    private void checkIpAddresses(InetAddress inetAddress, String ipv4, String ipv6) {
+        if (inetAddress instanceof Inet4Address) {
+            assertEquals("Wrong value for IP address.", ipv4, InetAddresses.toAddrString(inetAddress));
+        } else if (inetAddress instanceof Inet6Address) {
+            assertEquals("Wrong value for IP address.", ipv6, InetAddresses.toAddrString(inetAddress));
+        }
+    }
+
+    private NodeFlow prepareOdFlow() {
+        FlowAddedBuilder odNodeFlowBuilder = new FlowAddedBuilder();
+        odNodeFlowBuilder.setCookie(new BigInteger("9223372036854775807"));
+        odNodeFlowBuilder.setHardTimeout(32767);
+        odNodeFlowBuilder.setIdleTimeout(32767);
+        odNodeFlowBuilder.setPriority(32767);
+        odNodeFlowBuilder.setAction(prepareOdActions());
+        odNodeFlowBuilder.setMatch(prepareOdMatch());
+
+        return odNodeFlowBuilder.build();
+    }
+
+    private List<Action> prepareOdActions() {
+        List<Action> odActions = new ArrayList<>();
+
+        ControllerActionBuilder controllerActionBuilder = new ControllerActionBuilder();
+        DropActionBuilder dropActionBuilder = new DropActionBuilder();
+        FloodActionBuilder floodActionBuilder = new FloodActionBuilder();
+        FloodAllActionBuilder floodAllActionBuilder = new FloodAllActionBuilder();
+        HwPathActionBuilder hwPathActionBuilder = new HwPathActionBuilder();
+        LoopbackActionBuilder loopbackActionBuilder = new LoopbackActionBuilder();
+        OutputActionBuilder outputActionBuilder = new OutputActionBuilder();
+        PopMplsActionBuilder popMplsActionBuilder = new PopMplsActionBuilder();
+        PopVlanActionBuilder popVlanActionBuilder = new PopVlanActionBuilder();
+        PushMplsActionBuilder pushMplsActionBuilder = new PushMplsActionBuilder();
+        PushPbbActionBuilder pushPbbActionBuilder = new PushPbbActionBuilder();
+        PushVlanActionBuilder pushVlanActionBuilder = new PushVlanActionBuilder();
+        SetDlDstActionBuilder setDlDstActionBuilder = new SetDlDstActionBuilder();
+        SetDlSrcActionBuilder setDlSrcActionBuilder = new SetDlSrcActionBuilder();
+        SetDlTypeActionBuilder setDlTypeActionBuilder = new SetDlTypeActionBuilder();
+        SetMplsTtlActionBuilder setMplsTtlActionBuilder = new SetMplsTtlActionBuilder();
+        SetNwTosActionBuilder setNwTosActionBuilder = new SetNwTosActionBuilder();
+        SetNwTtlActionBuilder setNwTtlActionBuilder = new SetNwTtlActionBuilder();
+        SetQueueActionBuilder setQueueActionBuilder = new SetQueueActionBuilder();
+        SetTpDstActionBuilder setTpDstActionBuilder = new SetTpDstActionBuilder();
+        SetTpSrcActionBuilder setTpSrcActionBuilder = new SetTpSrcActionBuilder();
+        SetVlanCfiActionBuilder setVlanCfiActionBuilder = new SetVlanCfiActionBuilder();
+        SetVlanIdActionBuilder setVlanIdActionBuilder = new SetVlanIdActionBuilder();
+        SetVlanPcpActionBuilder setVlanPcpActionBuilder = new SetVlanPcpActionBuilder();
+        SwPathActionBuilder swPathActionBuilder = new SwPathActionBuilder();
+
+        prepareActionOutput(outputActionBuilder);
+        prepareActionPushVlan(pushVlanActionBuilder);
+        prepareActionSetDlDst(setDlDstActionBuilder);
+        prepareActionSetDlSrc(setDlSrcActionBuilder);
+        prepareActionSetDlType(setDlTypeActionBuilder);
+        prepareActionNextHop(odActions);
+        prepareActionSetNwDst(odActions);
+        prepareActionSetNwSrc(odActions);
+        prepareActionSetNwTos(setNwTosActionBuilder);
+        prepareActionSetTpDst(setTpDstActionBuilder);
+        prepareActionSetTpSrc(setTpSrcActionBuilder);
+        prepareActionSetVlanCfi(setVlanCfiActionBuilder);
+        prepareActionSetVladId(setVlanIdActionBuilder);
+        prepareActionSetVlanPcp(setVlanPcpActionBuilder);
+
+        odActions.add(new ActionBuilder().setAction(controllerActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(dropActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(floodActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(floodAllActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(hwPathActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(loopbackActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(outputActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(popMplsActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(popVlanActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(pushMplsActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(pushPbbActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(pushVlanActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setDlDstActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setDlSrcActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setDlTypeActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setMplsTtlActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setNwTosActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setNwTtlActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setQueueActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setTpDstActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setTpSrcActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setVlanCfiActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setVlanIdActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(setVlanPcpActionBuilder.build()).build());
+        odActions.add(new ActionBuilder().setAction(swPathActionBuilder.build()).build());
+
+        return odActions;
+    }
+
+    private void prepareActionSetVlanPcp(SetVlanPcpActionBuilder setVlanPcpActionBuilder) {
+        setVlanPcpActionBuilder.setVlanPcp(new VlanPcp((short) 7));
+    }
+
+    private void prepareActionSetVladId(SetVlanIdActionBuilder setVlanIdActionBuilder) {
+        setVlanIdActionBuilder.setVlanId(new VlanId(4095));
+    }
+
+    private void prepareActionSetVlanCfi(SetVlanCfiActionBuilder setVlanCfiActionBuilder) {
+        setVlanCfiActionBuilder.setVlanCfi(new VlanCfi(1));
+    }
+
+    private void prepareActionSetTpDst(SetTpDstActionBuilder setTpDstActionBuilder) {
+        setTpDstActionBuilder.setPort(new PortNumber(65535));
+    }
+
+    private void prepareActionSetTpSrc(SetTpSrcActionBuilder setTpSrcActionBuilder) {
+        setTpSrcActionBuilder.setPort(new PortNumber(65535));
+    }
+
+    private void prepareActionSetNwTos(SetNwTosActionBuilder setNwTosActionBuilder) {
+        setNwTosActionBuilder.setTos(63);
+    }
+
+    private void prepareActionSetNwSrc(List<Action> odActions) {
+        // test case for IPv4
+        SetNwSrcActionBuilder setNwSrcActionBuilderIpv4 = new SetNwSrcActionBuilder();
+        setNwSrcActionBuilderIpv4.setAddress(prapareIpv4Address("192.168.100.102"));
+        odActions.add(new ActionBuilder().setAction(setNwSrcActionBuilderIpv4.build()).build());
+
+        // test case for IPv6
+        SetNwSrcActionBuilder setNwSrcActionBuilderIpv6 = new SetNwSrcActionBuilder();
+        setNwSrcActionBuilderIpv6.setAddress(prapareIpv6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7336"));
+        odActions.add(new ActionBuilder().setAction(setNwSrcActionBuilderIpv6.build()).build());
+    }
+
+    private void prepareActionSetNwDst(List<Action> odActions) {
+        // test case for IPv4
+        SetNwDstActionBuilder setNwDstActionBuilderIpv4 = new SetNwDstActionBuilder();
+        setNwDstActionBuilderIpv4.setAddress(prapareIpv4Address("192.168.100.101"));
+        odActions.add(new ActionBuilder().setAction(setNwDstActionBuilderIpv4.build()).build());
+
+        // test case for IPv6
+        SetNwDstActionBuilder setNwDstActionBuilderIpv6 = new SetNwDstActionBuilder();
+        setNwDstActionBuilderIpv6.setAddress(prapareIpv6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7335"));
+        odActions.add(new ActionBuilder().setAction(setNwDstActionBuilderIpv6.build()).build());
+    }
+
+    private void prepareActionNextHop(List<Action> odActions) {
+        // test case for IPv4
+        SetNextHopActionBuilder setNextHopActionBuilderIpv4 = new SetNextHopActionBuilder();
+        setNextHopActionBuilderIpv4.setAddress(prapareIpv4Address("192.168.100.100"));
+        odActions.add(new ActionBuilder().setAction(setNextHopActionBuilderIpv4.build()).build());
+
+        // test case for IPv6
+        SetNextHopActionBuilder setNextHopActionBuilderIpv6 = new SetNextHopActionBuilder();
+        setNextHopActionBuilderIpv6.setAddress(prapareIpv6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7334"));
+        odActions.add(new ActionBuilder().setAction(setNextHopActionBuilderIpv6.build()).build());
+    }
+
+    private Address prapareIpv4Address(String ipv4Address) {
+        Ipv4Builder ipv4Builder = new Ipv4Builder();
+        ipv4Builder.setIpv4Address(new Ipv4Prefix(ipv4Address));
+        return ipv4Builder.build();
+    }
+
+    private Address prapareIpv6Address(String ipv6Address) {
+        Ipv6Builder ipv6Builder = new Ipv6Builder();
+        ipv6Builder.setIpv6Address(new Ipv6Prefix(ipv6Address));
+        return ipv6Builder.build();
+    }
+
+    private void prepareActionSetDlType(SetDlTypeActionBuilder setDlTypeActionBuilder) {
+        setDlTypeActionBuilder.setDlType(new EtherType(513l));
+    }
+
+    private void prepareActionSetDlSrc(SetDlSrcActionBuilder setDlSrcActionBuilder) {
+        setDlSrcActionBuilder.setAddress(new MacAddress("24:77:03:7C:C5:F1"));
+    }
+
+    private void prepareActionSetDlDst(SetDlDstActionBuilder setDlDstActionBuilder) {
+        setDlDstActionBuilder.setAddress(new MacAddress("3C:A9:F4:00:E0:C8"));
+    }
+
+    private void prepareActionPushVlan(PushVlanActionBuilder pushVlanActionBuilder) {
+        pushVlanActionBuilder.setPcp(7); // 3 bits
+        pushVlanActionBuilder.setCfi(new VlanCfi(1)); // 1 bit
+        pushVlanActionBuilder.setVlanId(new VlanId(4095));
+        pushVlanActionBuilder.setTag(0x8100); // 12 bit
+    }
+
+    private void prepareActionOutput(OutputActionBuilder outputActionBuilder) {
+        List<Uri> uris = new ArrayList<>();
+        uris.add(new Uri("uri1"));
+        uris.add(new Uri("uri2"));
+        outputActionBuilder.setOutputNodeConnector(uris);
+    }
+
+    private Match prepareOdMatch() {
+        MatchBuilder odMatchBuilder = new MatchBuilder();
+        EthernetMatchBuilder odEthernetMatchBuilder = new EthernetMatchBuilder();
+        odMatchBuilder.setEthernetMatch(odEthernetMatchBuilder.build());
+
+        return odMatchBuilder.build();
+    }
+}
index 5aa3c3243abc83c60e63d72a299b5fe9b51b98af..2e8637a162b247028ba66d6773d99943204064a2 100644 (file)
         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
         <enunciate.version>1.26.2</enunciate.version>\r
     </properties>\r
+  <scm>\r
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>\r
+  </scm>\r
 \r
     <distributionManagement>\r
         <!-- OpenDayLight Released artifact -->\r
index a905ebfa304710408e1b51110141f80aa1c1c5f1..7f925bad5b452f134226096530b17e1c35eaf436 100644 (file)
         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
         <enunciate.version>1.26.2</enunciate.version>\r
     </properties>\r
+  <scm>\r
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>\r
+  </scm>\r
     <distributionManagement>\r
         <!-- OpenDayLight Released artifact -->\r
         <repository>\r
index 2c96ec215d6735d449deefe526cd1072015df9f0..685de7d46c5bce4ff20cfa9b7142b2296bb0f9fa 100644 (file)
@@ -22,7 +22,7 @@
        <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index ceea28e9544a283b8cc7bd101ff8ed1c22b16682..78812d41d4a0a758d69e3c64098bb2d6e4e64f1c 100644 (file)
@@ -22,7 +22,7 @@
        <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index ff40ba07ee14c4dc5daf6c8ecb8c4d952fa839f3..dda6a0f975714be2bb9d4a5aefc2582ecc63787a 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 75341a6fdf6317390f80f757402a09c8b952f35d..74e4ed8cdcd1c9bb634273578be78ce6a4f0ae90 100644 (file)
@@ -7,6 +7,11 @@
     <version>1.4.0-SNAPSHOT</version>
     <relativePath>../../commons/opendaylight</relativePath>
   </parent>
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
+  </scm>
 
   <groupId>org.opendaylight.controller</groupId>
   <artifactId>containermanager.northbound</artifactId>
@@ -23,7 +28,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index addf857aa10d5af113b3a41be643eebb92fa5784..bfd2eb62907988e6456c6ff1ccc81115b671e83f 100644 (file)
@@ -33,7 +33,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index e0315fb1ee2bb743c7788a98795bca7102a8139b..53af293510b55c570f7bff28d75b04204c8dbbfc 100644 (file)
@@ -33,7 +33,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index c1eb56aa29d1f14bdf003083b974229510f41633..e845daa9d3ed03c8a3008e41f9d04baef8c9a54c 100644 (file)
@@ -33,7 +33,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 6a143d9853cdb156de6695c662d5fa0df5d64043..30426beeea2f1b0b4c12af3760d17ab8fc1fcd25 100644 (file)
         <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
         <enunciate.version>1.26.2</enunciate.version>\r
     </properties>\r
+  <scm>\r
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>\r
+  </scm>\r
 \r
     <distributionManagement>\r
         <!-- OpenDayLight Released artifact -->\r
@@ -79,7 +84,7 @@
         <dependency>\r
             <groupId>org.opendaylight.controller</groupId>\r
             <artifactId>containermanager</artifactId>\r
-            <version>0.4.0-SNAPSHOT</version>\r
+            <version>0.5.0-SNAPSHOT</version>\r
         </dependency>\r
         <dependency>\r
             <groupId>org.opendaylight.controller</groupId>\r
             <version>2.5.0</version>\r
         </dependency>\r
     </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index 2505da62cf255235d6d84cbf8d257e0d402e3fb5..b77536b8dba967743c8f0fd18e0ee188b1f6c75a 100644 (file)
@@ -103,11 +103,11 @@ public class NeutronNetworksNorthbound {
             Boolean bShared = null;\r
             Boolean bRouterExternal = null;\r
             if (queryAdminStateUp != null)\r
-                bAdminStateUp = new Boolean(queryAdminStateUp);\r
+                bAdminStateUp = Boolean.valueOf(queryAdminStateUp);\r
             if (queryShared != null)\r
-                bShared = new Boolean(queryShared);\r
+                bShared = Boolean.valueOf(queryShared);\r
             if (queryRouterExternal != null)\r
-                bRouterExternal = new Boolean(queryRouterExternal);\r
+                bRouterExternal = Boolean.valueOf(queryRouterExternal);\r
             if ((queryID == null || queryID.equals(oSN.getID())) &&\r
                     (queryName == null || queryName.equals(oSN.getNetworkName())) &&\r
                     (bAdminStateUp == null || bAdminStateUp.booleanValue() == oSN.isAdminStateUp()) &&\r
index 1028ca59abbd045b61aeb768bcb6cb1b33496416..73d85b250b18ef6f3c2974c783dfb9de555e4c3e 100644 (file)
@@ -33,7 +33,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 74f64c2457189905db3cd215070f0cb032b39c9e..b2fd4222a8e32181516f718b6a763dbad2c25a08 100644 (file)
@@ -33,7 +33,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index ba58e06ecbdc6f5841769e398b44fe1f103179c1..693f7eba7b22cc632db010113a26b0c8bd5efe5b 100644 (file)
@@ -48,7 +48,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 401cc948b888f5ab38ae99157cb141e551094b4c..8ca712fffc875dee7576128eecab295027b32685 100644 (file)
@@ -34,7 +34,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index d379164a14f483ddf123224bad12cad9996fb345..d15e4e034be6633e70644ddb197944137cbb9b62 100644 (file)
@@ -34,7 +34,7 @@
       <plugin>
           <groupId>org.apache.felix</groupId>
           <artifactId>maven-bundle-plugin</artifactId>
-          <version>2.3.6</version>
+          <version>${bundle.plugin.version}</version>
           <extensions>true</extensions>
           <configuration>
           <instructions>
index ce22ddf517d23f1aa27122e2269d181a2f806e2f..a9990abd9738448b519ae3d2f372b87b5de9bbad 100644 (file)
@@ -24,7 +24,7 @@
                         <plugin>
                                 <groupId>org.apache.felix</groupId>
                                 <artifactId>maven-bundle-plugin</artifactId>
-                                <version>2.3.6</version>
+                                <version>${bundle.plugin.version}</version>
                                 <extensions>true</extensions>
                                 <configuration>
                                         <instructions>
index c93d4b61e760ff3871855306f7f43af35a026a72..a7f4db8460ab02124b4adaa990570f873e7d7e3b 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 6401ec52f81faba1694302314882affb0d818ca5..a920adf71d35163094514674fbb5b8a158bf66d7 100644 (file)
@@ -26,6 +26,7 @@ import org.opendaylight.controller.protocol_plugin.openflow.core.IController;
 import org.opendaylight.controller.protocol_plugin.openflow.core.IMessageListener;
 import org.opendaylight.controller.protocol_plugin.openflow.core.ISwitch;
 import org.opendaylight.controller.protocol_plugin.openflow.core.ISwitchStateListener;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.connection.IPluginOutConnectionService;
 import org.opendaylight.controller.sal.core.Actions;
 import org.opendaylight.controller.sal.core.Buffers;
@@ -259,7 +260,11 @@ public class InventoryServiceShim implements IContainerListener,
         }
 
         // Add this node
-        addNode(sw);
+        if (connectionOutService.getLocalityStatus(node) != ConnectionLocality.NOT_CONNECTED) {
+            addNode(sw);
+        } else {
+            logger.debug("Skipping node addition due to Connectivity Status : {}", connectionOutService.getLocalityStatus(node).name());
+        }
     }
 
     @Override
index bd3c2a2c04e95fb01ce31c1d595ba02069b8a04a..f8c3d59bb353e120f535b7949b7a005b839b66f5 100644 (file)
@@ -303,12 +303,6 @@ public class V6StatsReply extends OFVendorStatistics {
             this.actions = this.actionFactory.parseActions(data, action_len);
     }
 
-    @Override
-    public void writeTo(ByteBuffer data) {
-        super.writeTo(data);//TBD. This Fn needs work. Should never get called though.
-
-    }
-
     @Override
     public int hashCode() {
         final int prime = 31;
index 7f556598f1c7f25a292b74d3d05e01c8b9a04256..b17d63df3899fe8c8b0a4484b1ac27581e0b3edb 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 37d3e2fb199a63bb20096661cd6384cf93ec2e95..77330fd7c80d1d3dd32a67e84f17cb104633e8f7 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 32da9f3201cc6875f8b1a30bdf863c2edc8b168a..9b7e3dd71271d63ed5a5a5fbefe4d2a254c490fe 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index c3f40aa42edbf3353615a121e9970d95633e4736..00fda77e69938fe82cc04820fecb74a4acef6426 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index 456acf016684cdfa4ece97918c03c89240c26bf2..16e215444eecdb1f9e63b9e8f5691e57ba18cdf6 100644 (file)
@@ -22,4 +22,6 @@ public interface IPluginOutConnectionService {
      * @return true if node is local to this controller. false otherwise.
      */
     public boolean isLocal(Node node);
+
+    public ConnectionLocality getLocalityStatus(Node node);
 }
\ No newline at end of file
index 44f793a09174cdf363fb84cf54268d7b806a6e0e..f2817ebd0bc70bdfa4aa4a41e66564973f01a541 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index e2132fb8a09ed5144ab27abe3c907766e4961a94..1c7e2c05e65f54d28a6560b7c62daa5054104046 100644 (file)
@@ -16,6 +16,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
+import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.connection.IConnectionListener;
 import org.opendaylight.controller.sal.connection.IConnectionService;
 import org.opendaylight.controller.sal.connection.IPluginInConnectionService;
@@ -104,6 +105,12 @@ public class ConnectionService implements IPluginOutConnectionService, IConnecti
         return connectionListener.isLocal(node);
     }
 
+    @Override
+    public ConnectionLocality getLocalityStatus(Node node) {
+        if (this.connectionListener == null) return ConnectionLocality.NOT_CONNECTED;
+        return connectionListener.getLocalityStatus(node);
+    }
+
     @Override
     public Node connect (String type, String connectionIdentifier, Map<ConnectionConstants, String> params) {
         IPluginInConnectionService s = pluginService.get(type);
index dddc3c3e58879bfd78ab79e31df354eb32ecf9fd..b44e85553d146339344b2b8d179e9ee03f7a9187 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index 1f6f9cdf66b54fca94de07046e6da935ca18da8b..d11433894131d88fab96dd230675b208431e402c 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index 48e0ff615c598ff109c2bc37833e48f1388f4f2b..190c74cb7846c3f95f9a99bbf5dc088c9cb0e1b8 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>\r
         <groupId>org.apache.felix</groupId>\r
         <artifactId>maven-bundle-plugin</artifactId>\r
-        <version>2.3.6</version>\r
+        <version>${bundle.plugin.version}</version>\r
         <extensions>true</extensions>\r
         <configuration>\r
           <instructions>\r
index 81a078a35bc6b5d8cacc1deeb82b1fdc06ab1b72..c4d8686c65ef958e309fdeeb9c2e4082da633d91 100644 (file)
@@ -24,7 +24,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index e001dc8e58765a619e1508c1dc30f5f4cf0362be..c24ba8a169726ae4e5d9238c41bb5b4d09464d5b 100644 (file)
@@ -34,7 +34,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 552ff883428f65a346bf04cab4d5e3a3674d83f5..87036cdbf37610922e529a6c109aa7ac8c203133 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 3c2cb8ef6df0322c045d6213b9978be2c2033a5b..9c5b89b95ad421e51c8727086310c2386fecc7a9 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index bddcc2ae0eff9a14d8a4999d30484c83b17dcfaf..b972f5d9a4d026eef6d2c7027e151bb59b2ffc27 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index d7dea84686eca42ecf15a91e19dd1d58542a6845..4d47312e023ec2e1ec39faea1e8aad611dd444c4 100644 (file)
@@ -39,7 +39,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 14a056d5fee3b50ba27f2fe240d378495dc7ad85..3c2be9002d2e6e1b0a96df14bf5aa70862788025 100644 (file)
@@ -40,7 +40,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index ee126f3408ce51d6b1036f351f4ffb7a1be218b8..68dae260b042294e2289a55a498cae61419c0d06 100644 (file)
@@ -40,7 +40,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 399f878223aa639e5acd421ecb55b7134ab83d12..ebf9dbc10c6fa1bb8885f09d33ad592e351cb7cd 100755 (executable)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index eb4bea584c5efa8d4737ca4b6b7b8de173aad25e..fbf374fa3da7781c3f28587a76e9748425d15667 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 07c814adf14c7b2d35f9991a9bd3e5875296f922..2e03db16558ad61ad90b428fb9fd76116682a074 100644 (file)
@@ -38,7 +38,7 @@ public class UserConfig implements Serializable {
     private static final boolean strongPasswordCheck = Boolean.getBoolean("enableStrongPasswordCheck");
     private static final String BAD_PASSWORD = "Bad Password";
     private static final int USERNAME_MAXLENGTH = 32;
-    protected static final String PASSWORD_REGEX = "(?=.*[^\\w])(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,256}$";
+    protected static final String PASSWORD_REGEX = "(?=.*[^a-zA-Z0-9])(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,256}$";
     private static final Pattern INVALID_USERNAME_CHARACTERS = Pattern.compile("([/\\s\\.\\?#%;\\\\]+)");
     private static MessageDigest oneWayFunction = null;
     static {
index 8c029a7488361b778b2749fe327a48a812d675c0..4c377271dc1c9098ac46248513f10b4191b631b2 100644 (file)
@@ -153,5 +153,9 @@ public class AuthorizationUserConfigTest {
         // No special characters
         password = "aBc4ef7H8";
         assertFalse(password.matches(regex));
+
+        // Underscore is a special character
+        password = "Azmb_123 ";
+        assertTrue(password.matches(regex));
     }
 }
index 25e558eed962764acb357664ccaefd5cada33410..49a4e77d2da38c533cef11a0cea1e135ca45fdff 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 5a1968d416b40a05f2a0be2ee4a7377e6b49ff53..541dbcadfd8644023b03055f3109220cf604ecd3 100644 (file)
@@ -25,7 +25,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>2.3.6</version>
+                <version>${bundle.plugin.version}</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
index ac52095aea62f6f309c751ce4a642df272fa1f71..c0555d9d1d3280b1e1f0b512fd76d1948c7334cd 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 34688cbb634eeede8c0ebfae25a121e673712bf4..6987ea9827547783e10da1f2af4ca4d0d1f8b5ea 100644 (file)
@@ -130,7 +130,7 @@ public class Devices implements IDaylightWeb {
                 nodeDatum.put("mode", modeStr);
 
                 nodeDatum.put("json", gson.toJson(nodeDatum));
-                nodeDatum.put("mac", HexEncode.bytesToHexString(device.getDataLayerAddress()));
+                nodeDatum.put("mac", HexEncode.bytesToHexStringFormat(device.getDataLayerAddress()));
                 StringBuffer sb1 = new StringBuffer();
                 Set<NodeConnector> nodeConnectorSet = device.getNodeConnectors();
                 if (nodeConnectorSet != null && nodeConnectorSet.size() > 0) {
index 90352602cd119daca080abbaf2ff1fb956576d9c..b02a15a7e5748f96368e425d2a374f04f1647b74 100644 (file)
@@ -278,7 +278,7 @@ one.f.switchmanager.nodesLearnt = {
         footer: {
             updateNode: function() {
                 var footer = [];
-                var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.nodesLearnt.id.modal.save, "btn-success", "");
+                var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.nodesLearnt.id.modal.save, "btn-primary", "");
                 var $saveButton = one.lib.dashlet.button.button(saveButton);
                 footer.push($saveButton);
 
@@ -356,7 +356,7 @@ one.f.switchmanager.nodesLearnt = {
                         },
                         {
                             property: 'mac',
-                            label: 'MAC',
+                            label: 'MAC Address',
                             sortable: true
                         },
                         {
@@ -516,6 +516,10 @@ one.f.switchmanager.subnetGatewayConfig = {
                     one.f.switchmanager.subnetGatewayConfig.id.dashlet.addPorts, "btn-primary", "btn-mini");
                 var $button = one.lib.dashlet.button.button(button);
                 $button.click(function() {
+                    if (one.f.switchmanager.subnetGatewayConfig.registry.gateways.length === 0) {
+                      alert('No Gateways Exist');
+                      return false;
+                    }
                     var $modal = one.f.switchmanager.subnetGatewayConfig.modal.initialize.ports();
                     $modal.modal();
                 });
@@ -649,8 +653,9 @@ one.f.switchmanager.subnetGatewayConfig = {
                 // gateway IP Mask 
                 var $label = one.lib.form.label("Gateway IP Address/Mask");
                 var $input = one.lib.form.input("Gateway IP Address/Mask");
+                var $help = one.lib.form.help('Example: 192.168.10.254/16');
                 $input.attr('id', one.f.switchmanager.subnetGatewayConfig.id.modal.form.gatewayIPAddress);
-                $fieldset.append($label).append($input);
+                $fieldset.append($label).append($input).append($help);
                 
                 $form.append($fieldset);
                 return $form;
@@ -662,6 +667,7 @@ one.f.switchmanager.subnetGatewayConfig = {
                 var $label = one.lib.form.label("Gateway Name");
                 var $select = one.lib.form.select.create(one.f.switchmanager.subnetGatewayConfig.registry.gateways);
                 $select.attr('id', one.f.switchmanager.subnetGatewayConfig.id.modal.form.name);
+                one.lib.form.select.prepend($select, { '' : 'Please Select a Gateway' });
                 $select.val($select.find("option:first").val());
                 $fieldset.append($label).append($select);
 
@@ -692,6 +698,7 @@ one.f.switchmanager.subnetGatewayConfig = {
                 // ports
                 var $label = one.lib.form.label("Select Port");
                 var $select = one.lib.form.select.create();
+                one.lib.form.select.prepend($select, { '' : 'Please Select a Port' });
                 $select.attr('id', one.f.switchmanager.subnetGatewayConfig.id.modal.form.ports);
                 $fieldset.append($label).append($select);
                 
@@ -713,7 +720,7 @@ one.f.switchmanager.subnetGatewayConfig = {
         },
         footer : function() {
             var footer = [];
-            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.subnetGatewayConfig.id.modal.save, "btn-success", "");
+            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.subnetGatewayConfig.id.modal.save, "btn-primary", "");
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
@@ -1042,13 +1049,15 @@ one.f.switchmanager.staticRouteConfig = {
             // static route IP Mask 
             var $label = one.lib.form.label("Static Route");
             var $input = one.lib.form.input("Static Route");
+            var $help = one.lib.form.help('Example: 53.55.0.0/16');
             $input.attr('id', one.f.switchmanager.staticRouteConfig.id.modal.form.staticRoute);
-            $fieldset.append($label).append($input);
+            $fieldset.append($label).append($input).append($help);
             // static route IP Mask 
             var $label = one.lib.form.label("Next Hop");
             var $input = one.lib.form.input("Next Hop");
+            var $help = one.lib.form.help('Example: 192.168.10.254');
             $input.attr('id', one.f.switchmanager.staticRouteConfig.id.modal.form.nextHop);
-            $fieldset.append($label).append($input);
+            $fieldset.append($label).append($input).append($help);
             // return
             $form.append($fieldset);
             return $form;
@@ -1065,7 +1074,7 @@ one.f.switchmanager.staticRouteConfig = {
         },
         footer : function() {
             var footer = [];
-            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.staticRouteConfig.id.modal.save, "btn-success", "");
+            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.staticRouteConfig.id.modal.save, "btn-primary", "");
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
@@ -1334,20 +1343,24 @@ one.f.switchmanager.spanPortConfig = {
                 // retrieve port value
                 var nodeId = $(this).find('option:selected').attr('value');
                 one.f.switchmanager.spanPortConfig.registry['currentNode'] = nodeId;
-                var $ports = $('#' + one.f.switchmanager.spanPortConfig.id.modal.form.port);
+                var $ports = $('#'+one.f.switchmanager.spanPortConfig.id.modal.form.port);
                 var ports = one.f.switchmanager.spanPortConfig.registry['nodePorts'][nodeId]
                 var options = {};
                 $(ports).each(function(idx, val) {
                     options[val.internalPortName] = val.portName+' ('+val.portId+')'; 
                 });
                 one.lib.form.select.inject($ports, options); 
+                one.lib.form.select.prepend($ports, {'':'Please Select a Port'});
+                $ports.val($ports.find('option:first').val());
             });
 
             $fieldset.append($label).append($select);
             // input port
             var $label = one.lib.form.label("Input Port");
             var $select = one.lib.form.select.create();
+            one.lib.form.select.prepend($select, {'':'None'});
             $select.attr('id', one.f.switchmanager.spanPortConfig.id.modal.form.port);
+            $select.val($select.find('option:first').val());
             $fieldset.append($label).append($select);
             
             // return
@@ -1377,14 +1390,14 @@ one.f.switchmanager.spanPortConfig = {
         },
         footer : function() {
             var footer = [];
-            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.spanPortConfig.id.modal.save, "btn-success", "");
+            var saveButton = one.lib.dashlet.button.single("Save", one.f.switchmanager.spanPortConfig.id.modal.save, "btn-primary", "");
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
         },
         removeMultiple: {
             dialog: function(spanPortsToDelete) {
-                var h3 = 'Remove Span Port';
+                var h3 = 'Remove SPAN Port';
                 
                 var footer = one.f.switchmanager.spanPortConfig.modal.removeMultiple.footer();
                 var $body = one.f.switchmanager.spanPortConfig.modal.removeMultiple.body(spanPortsToDelete);
index 0f1f0cf13503d0e3cf307dd9d2af223a6df6a81c..8dd5777350ee6e2be62eddfe417bf8b8f3d36ca4 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index f3bbf7559b142b0375ea35e8d3f9c052152d284a..f0486c525c35aded862a2441184c48c5a3485b1a 100644 (file)
@@ -659,7 +659,8 @@ one.f.flows = {
             var $form = $(document.createElement('form'));
             var $fieldset = $(document.createElement('fieldset'));
             // flow description
-            var $legend = one.lib.form.legend("Flow Description");
+            var $legend = one.lib.form.legend("");
+            $legend.css('visibility', 'hidden');
             $fieldset.append($legend);
             // name
             var $label = one.lib.form.label("Name");
@@ -739,31 +740,27 @@ one.f.flows = {
             $fieldset.append($label).append($input).append($help);
             // srcMac
             var $label = one.lib.form.label("Source MAC Address");
-            var $input = one.lib.form.input("Source MAC Address");
+            var $input = one.lib.form.input("3c:97:0e:75:c3:f7");
             $input.attr('id', one.f.flows.id.modal.form.srcMac);
-            var $help = one.lib.form.help("Example: 00:11:22:aa:bb:cc");
-            $fieldset.append($label).append($input).append($help);
+            $fieldset.append($label).append($input);
             // dstMac
             var $label = one.lib.form.label("Destination MAC Address");
-            var $input = one.lib.form.input("Destination MAC Address");
+            var $input = one.lib.form.input("7c:d1:c3:e8:e6:99");
             $input.attr('id', one.f.flows.id.modal.form.dstMac);
-            var $help = one.lib.form.help("Example: 00:11:22:aa:bb:cc");
-            $fieldset.append($label).append($input).append($help);
+            $fieldset.append($label).append($input);
             // layer 3
             var $legend = one.lib.form.legend("Layer 3");
             $fieldset.append($legend);
             // srcIp
             var $label = one.lib.form.label("Source IP Address");
-            var $input = one.lib.form.input("Source IP Address");
+            var $input = one.lib.form.input("192.168.3.128");
             $input.attr('id', one.f.flows.id.modal.form.srcIp);
-            var $help = one.lib.form.help("Example: 127.0.0.1");
-            $fieldset.append($label).append($input).append($help);
+            $fieldset.append($label).append($input);
             // dstIp
             var $label = one.lib.form.label("Destination IP Address");
-            var $input = one.lib.form.input("Destination IP Address");
+            var $input = one.lib.form.input("2001:2334::0/32");
             $input.attr('id', one.f.flows.id.modal.form.dstIp);
-            var $help = one.lib.form.help("Example: 127.0.0.1");
-            $fieldset.append($label).append($input).append($help);
+            $fieldset.append($label).append($input);
             // tosBits
             var $label = one.lib.form.label("TOS Bits");
             var $input = one.lib.form.input("TOS Bits");
index 641f32f876375011b2a2f2b110e7d2d226c0f694..05a8f5b1d7651cd4b6c442cabead605853583bba 100644 (file)
@@ -23,7 +23,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index c4c66e46d5af0bd9d0483807fa50e38339b5c4dd..7ad2df353a439205d502d9546c46d29f14cac837 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 2be78c49a52a835cf6bd9b22e2bf447617a191f0..6b87e74c697c32761c026fa51c309e1f39136409 100644 (file)
@@ -22,7 +22,7 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.6</version>
+        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 0789d504432dc39ec5b731fc127cf88c72b99e5f..569921cd2712563f00a2b5ea0a42df954e450266 100644 (file)
@@ -7,6 +7,11 @@
     <version>1.1.0-SNAPSHOT</version>
     <relativePath>../commons/thirdparty</relativePath>
   </parent>
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
+  </scm>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.controller.thirdparty</groupId>
   <artifactId>org.apache.catalina.filters.CorsFilter</artifactId>