Merge "Remove java.lang redundant imports. Taken from sonar."
authorGiovanni Meo <gmeo@cisco.com>
Tue, 10 Sep 2013 09:15:51 +0000 (09:15 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 10 Sep 2013 09:15:51 +0000 (09:15 +0000)
29 files changed:
NOTICE [new file with mode: 0644]
opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml
opendaylight/commons/opendaylight/pom.xml
opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini
opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowConfig.java
opendaylight/forwardingrulesmanager/api/src/test/java/org/opendaylight/controller/forwardingrulesmanager/frmTest.java
opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java
opendaylight/northbound/integrationtest/pom.xml
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DiscoveryService.java
opendaylight/sal/yang-prototype/pom.xml
opendaylight/sal/yang-prototype/sal/model/model-flow-base/pom.xml
opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/match-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/opendaylight-flow-base.yang with 75% similarity]
opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/flow-service.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-config.yang [deleted file]
opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-service.yang [deleted file]
opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/packet-processing.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/flow-statistics.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/statistics-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/opendaylight-flow-statistics.yang with 54% similarity]
opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/opendaylight-inventory.yang [deleted file]
opendaylight/sal/yang-prototype/sal/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/pom.xml
opendaylight/sal/yang-prototype/sal/sal-broker-impl/pom.xml
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java
opendaylight/web/devices/src/main/resources/js/page.js
opendaylight/web/flows/src/main/resources/js/page.js
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java
opendaylight/web/root/src/main/resources/js/open.js

diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..5768a81
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,4 @@
+Cisco Systems, Inc. wishes to acknowledge the seminal and leading work of David Erickson.
+David's implementation of Beacon was one of the first open-source network controllers.
+The OpenDaylight Project would not exist were it not for David's intellectual and 
+architectural contribution and his inspiration lives on in the OpenDaylight code base today.
index d9b4720503a49f55119279040557bf4b744e8b21..b84346514f17c85a3b4d24c2f1f1878747bcd623 100644 (file)
       <id>central2</id>\r
       <name>central2</name>\r
       <url>http://repo2.maven.org/maven2</url>\r
+       <snapshots>\r
+        <enabled>false</enabled>\r
+      </snapshots>\r
+      <releases>\r
+        <enabled>true</enabled>\r
+      </releases>\r
     </pluginRepository>\r
     <pluginRepository>\r
       <id>opendaylight.snapshot</id>\r
       <id>central2</id>\r
       <name>central2</name>\r
       <url>http://repo2.maven.org/maven2</url>\r
+      <snapshots>\r
+        <enabled>false</enabled>\r
+      </snapshots>\r
+      <releases>\r
+        <enabled>true</enabled>\r
+      </releases>\r
     </repository>\r
     <repository>\r
       <id>central</id>\r
       <name>central</name>\r
       <url>http://repo1.maven.org/maven2</url>\r
+      <snapshots>\r
+        <enabled>false</enabled>\r
+      </snapshots>\r
+      <releases>\r
+        <enabled>true</enabled>\r
+      </releases>\r
     </repository>\r
     <!-- Pax mirror -->\r
     <!-- https://oss.sonatype.org/content/repositories/ops4j-releases -->\r
index 4ad7c9403285bba8171fa4e03cc9cd214e7f8c8b..f6282d86a2e1e11967521e76aa277fabcd8a406d 100644 (file)
           <groupId>com.google.guava</groupId>
           <artifactId>guava</artifactId>
           <version>${guava.version}</version>
-          <type>jar</type>
         </dependency>
         <dependency>
           <groupId>org.javassist</groupId>
       <id>central2</id>
       <name>central2</name>
       <url>http://repo2.maven.org/maven2</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+          <enabled>true</enabled>
+      </releases>
     </repository>
     <repository>
       <id>central</id>
       <name>central</name>
       <url>http://repo1.maven.org/maven2</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+          <enabled>true</enabled>
+      </releases>
     </repository>
     <!-- Pax mirror -->
     <!-- https://oss.sonatype.org/content/repositories/ops4j-releases -->
index 5501be46b2e59afb2743d70aad90c549ad5a4ae7..ba1a54b662f3f4c68d328bc5390c57239c2d451e 100644 (file)
@@ -70,8 +70,8 @@ org.eclipse.gemini.web.tomcat.config.path=configuration/tomcat-server.xml
 # of.discoveryTimeoutMultiple=2
 # For newly added ports, allow one more retry if the elapsed time exceeds this threshold (default 30 sec)
 # of.discoveryThreshold=30
-# The maximum number of ports handled in one discovery batch (default 1024)
-# of.discoveryBatchMaxPorts=1024
+# The maximum number of ports handled in one discovery batch (default 512)
+# of.discoveryBatchMaxPorts=512
 
 # TLS configuration
 # To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files.
index 0304af493d9fe64abab2df516bc5b3c2e63c098c..ba69c8a3d29f8286f2d4f3157f6547a8f54c717b 100644 (file)
@@ -832,127 +832,128 @@ public class FlowConfig implements Serializable {
             }
 
             Matcher sstr;
-            if (actions != null && !actions.isEmpty()) {
-                for (String actiongrp : actions) {
-                    // check output ports
-                    sstr = Pattern.compile("OUTPUT=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        for (String t : sstr.group(1).split(",")) {
-                            Matcher n = Pattern.compile("(?:(\\d+))").matcher(t);
-                            if (n.matches()) {
-                                if (n.group(1) != null) {
-                                    Short port = Short.parseShort(n.group(1));
-                                    if (isPortValid(sw, port) == false) {
-                                        String msg = String.format("Output port %d is not valid for this switch", port);
-                                        if (!containerName.equals(GlobalConstants.DEFAULT.toString())) {
-                                            msg += " in Container " + containerName;
-                                        }
-                                        return new Status(StatusCode.BADREQUEST, msg);
+            if (actions == null || actions.isEmpty()) {
+                return new Status(StatusCode.BADREQUEST, "Actions value is null or empty");
+            }
+            for (String actiongrp : actions) {
+                // check output ports
+                sstr = Pattern.compile("OUTPUT=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    for (String t : sstr.group(1).split(",")) {
+                        Matcher n = Pattern.compile("(?:(\\d+))").matcher(t);
+                        if (n.matches()) {
+                            if (n.group(1) != null) {
+                                Short port = Short.parseShort(n.group(1));
+                                if (isPortValid(sw, port) == false) {
+                                    String msg = String.format("Output port %d is not valid for this switch", port);
+                                    if (!containerName.equals(GlobalConstants.DEFAULT.toString())) {
+                                        msg += " in Container " + containerName;
                                     }
+                                    return new Status(StatusCode.BADREQUEST, msg);
                                 }
                             }
                         }
-                        continue;
                     }
-                    // Check src IP
-                    sstr = Pattern.compile(ActionType.FLOOD.toString()).matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if (!containerName.equals(GlobalConstants.DEFAULT.toString())) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "flood is not allowed in container %s", containerName));
-                        }
-                        continue;
+                    continue;
+                }
+                // Check src IP
+                sstr = Pattern.compile(ActionType.FLOOD.toString()).matcher(actiongrp);
+                if (sstr.matches()) {
+                    if (!containerName.equals(GlobalConstants.DEFAULT.toString())) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "flood is not allowed in container %s", containerName));
                     }
-                    // Check src IP
-                    sstr = Pattern.compile(ActionType.SET_NW_SRC.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if (!NetUtils.isIPv4AddressValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format("IP source address %s is not valid",
-                                    sstr.group(1)));
-                        }
-                        continue;
+                    continue;
+                }
+                // Check src IP
+                sstr = Pattern.compile(ActionType.SET_NW_SRC.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if (!NetUtils.isIPv4AddressValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format("IP source address %s is not valid",
+                                sstr.group(1)));
                     }
-                    // Check dst IP
-                    sstr = Pattern.compile(ActionType.SET_NW_DST.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if (!NetUtils.isIPv4AddressValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "IP destination address %s is not valid", sstr.group(1)));
-                        }
-                        continue;
+                    continue;
+                }
+                // Check dst IP
+                sstr = Pattern.compile(ActionType.SET_NW_DST.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if (!NetUtils.isIPv4AddressValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "IP destination address %s is not valid", sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_VLAN_ID.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isVlanIdValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Vlan ID %s is not in the range 0 - 4095", sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_VLAN_ID.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isVlanIdValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Vlan ID %s is not in the range 0 - 4095", sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_VLAN_PCP.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isVlanPriorityValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Vlan priority %s is not in the range 0 - 7", sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_VLAN_PCP.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isVlanPriorityValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Vlan priority %s is not in the range 0 - 7", sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_DL_SRC.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isL2AddressValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Ethernet source address %s is not valid. Example: 00:05:b9:7c:81:5f",
-                                    sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_DL_SRC.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isL2AddressValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Ethernet source address %s is not valid. Example: 00:05:b9:7c:81:5f",
+                                sstr.group(1)));
                     }
-                    sstr = Pattern.compile(ActionType.SET_DL_DST.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isL2AddressValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Ethernet destination address %s is not valid. Example: 00:05:b9:7c:81:5f",
-                                    sstr.group(1)));
-                        }
-                        continue;
+                    continue;
+                }
+                sstr = Pattern.compile(ActionType.SET_DL_DST.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isL2AddressValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Ethernet destination address %s is not valid. Example: 00:05:b9:7c:81:5f",
+                                sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_NW_TOS.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isTOSBitsValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "IP ToS bits %s is not in the range 0 - 63", sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_NW_TOS.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isTOSBitsValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "IP ToS bits %s is not in the range 0 - 63", sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_TP_SRC.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isTpPortValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Transport source port %s is not valid", sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_TP_SRC.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isTpPortValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Transport source port %s is not valid", sstr.group(1)));
                     }
+                    continue;
+                }
 
-                    sstr = Pattern.compile(ActionType.SET_TP_DST.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if ((sstr.group(1) != null) && !isTpPortValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "Transport destination port %s is not valid", sstr.group(1)));
-                        }
-                        continue;
+                sstr = Pattern.compile(ActionType.SET_TP_DST.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if ((sstr.group(1) != null) && !isTpPortValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "Transport destination port %s is not valid", sstr.group(1)));
                     }
-                    sstr = Pattern.compile(ActionType.SET_NEXT_HOP.toString() + "=(.*)").matcher(actiongrp);
-                    if (sstr.matches()) {
-                        if (!NetUtils.isIPAddressValid(sstr.group(1))) {
-                            return new Status(StatusCode.BADREQUEST, String.format(
-                                    "IP destination address %s is not valid", sstr.group(1)));
-                        }
-                        continue;
+                    continue;
+                }
+                sstr = Pattern.compile(ActionType.SET_NEXT_HOP.toString() + "=(.*)").matcher(actiongrp);
+                if (sstr.matches()) {
+                    if (!NetUtils.isIPAddressValid(sstr.group(1))) {
+                        return new Status(StatusCode.BADREQUEST, String.format(
+                                "IP destination address %s is not valid", sstr.group(1)));
                     }
+                    continue;
                 }
             }
             // Check against the container flow
index 176d8e9ebdfea8a2f0bb341eed68177d69a235ed..a3e1ded14178ff8d00a3efe21d02ea798fa19af2 100644 (file)
@@ -19,8 +19,6 @@ import java.util.concurrent.ConcurrentMap;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.opendaylight.controller.forwardingrulesmanager.FlowConfig;
-import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
 import org.opendaylight.controller.sal.action.Action;
 import org.opendaylight.controller.sal.action.ActionType;
 import org.opendaylight.controller.sal.action.Controller;
@@ -523,6 +521,12 @@ public class frmTest {
         Assert.assertTrue(status.getDescription().contains("Node is null"));
 
         fc.setNode(Node.fromString(Node.NodeIDType.OPENFLOW, "1"));
+        Assert.assertFalse(fc.validate(null).isSuccess());
+        List<String> actions = new ArrayList<String>();
+        fc.setActions(actions);
+        Assert.assertFalse(fc.validate(null).isSuccess());
+        actions.add("OUTPUT=2");
+        fc.setActions(actions);
         Assert.assertTrue(fc.validate(null).isSuccess());
 
         fc.setPriority("-1");
index 2d270b44f98e23d65c0f03bddab1f913aabda7d5..7bd36a3cbf5b7cebde6665f23987a28a048b6d9c 100644 (file)
@@ -425,6 +425,10 @@ public class FlowProgrammerNorthbound {
                     "User is not authorized to perform this operation on container "
                             + containerName);
         }
+        if (flowConfig.getValue().getNode() == null) {
+            return Response.status(Response.Status.BAD_REQUEST).entity("Invalid Configuration. Node is null or empty")
+                    .build();
+        }
         handleResourceCongruence(name, flowConfig.getValue().getName());
         handleResourceCongruence(nodeId, flowConfig.getValue().getNode().getNodeIDString());
         handleDefaultDisabled(containerName);
index eeaa18bbe895822696ea009fed7333e008d4d27d..88cff5ed835e1475e7c0f7acaf80e40b06ca348b 100644 (file)
       <id>central2</id>
       <name>central2</name>
       <url>http://repo2.maven.org/maven2</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
     </pluginRepository>
   </pluginRepositories>
   <dependencies>
index 1938cb1ae68e66efe8bb68b12f42e3fcf1373703..0895d9af27c85132965a98ea23cd166784a3e538 100644 (file)
@@ -131,6 +131,7 @@ public class DiscoveryService implements IInventoryShimExternalListener, IDataPa
 
     class DiscoveryTransmit implements Runnable {
         private final BlockingQueue<NodeConnector> transmitQ;
+        private int count = 0;
 
         DiscoveryTransmit(BlockingQueue<NodeConnector> transmitQ) {
             this.transmitQ = transmitQ;
@@ -144,6 +145,9 @@ public class DiscoveryService implements IInventoryShimExternalListener, IDataPa
                     RawPacket outPkt = createDiscoveryPacket(nodeConnector);
                     sendDiscoveryPacket(nodeConnector, outPkt);
                     nodeConnector = null;
+                    if ((++count & 0x7f) == 0) {
+                        Thread.sleep(10);
+                    }
                 } catch (InterruptedException e1) {
                     logger.warn("DiscoveryTransmit interupted", e1.getMessage());
                     if (shuttingDown) {
@@ -1679,7 +1683,7 @@ public class DiscoveryService implements IInventoryShimExternalListener, IDataPa
      */
     private int getDiscoveryBatchMaxPorts() {
         String val = System.getProperty("of.discoveryBatchMaxPorts");
-        int ports = 1024;
+        int ports = 512;
 
         if (val != null) {
             try {
index 4c5db1086c098cf936a1daaf0b70902368f159eb..b1107594f50fb3d60390f71b081e2b495dc89f8c 100644 (file)
           <id>central2</id>
           <name>central2</name>
           <url>http://repo2.maven.org/maven2</url>
+          <snapshots>
+             <enabled>false</enabled>
+          </snapshots>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
         </pluginRepository>
         <pluginRepository>
             <id>opendaylight.snapshot</id>
           <id>central2</id>
           <name>central2</name>
           <url>http://repo2.maven.org/maven2</url>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
         </repository>
         <repository>
           <id>central</id>
           <name>central</name>
           <url>http://repo1.maven.org/maven2</url>
+          <snapshots>
+             <enabled>false</enabled>
+          </snapshots>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
         </repository>
         <!-- Pax mirror -->
         <!-- https://oss.sonatype.org/content/repositories/ops4j-releases -->
index 6eaaebada598c3fada00c18528adffc9468d309a..6c050735bb4ea78fff5ea946bb8623b9a99758e0 100644 (file)
@@ -14,7 +14,7 @@
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>model-flow-base</artifactId>
-
+    
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang
new file mode 100644 (file)
index 0000000..ed92bf4
--- /dev/null
@@ -0,0 +1,113 @@
+module opendaylight-flow-types {
+    namespace "urn:opendaylight:flow:types";
+    prefix flow;
+
+    import ietf-inet-types {prefix inet;}
+    import opendaylight-match-types {prefix match;}
+    import ietf-yang-types {prefix yang;}
+
+
+    revision "2013-08-19" {
+        description "Initial revision of flow service";
+    }
+
+    grouping action {
+        choice action {
+            case output-action {
+                leaf-list output-node-connector {
+                    type inet:uri;
+                }
+            }
+
+            case controller-action {
+                leaf max-length {
+                    type uint16 {
+                        range "0..65294";
+                    }
+                }
+            }
+
+            case set-queue-action {
+                leaf queue {
+                    type string; // TODO: define queues
+                }
+            }
+
+            case pop-mpls-action {
+                leaf ethernet-type {
+                        type uint16; // TODO: define ethertype type
+                }
+            }
+
+            case set-mpls-ttl-action {
+                leaf mpls-ttl {
+                    type uint8;
+                }
+            }
+
+            case set-nw-ttl-action {
+                leaf nw-ttl {
+                    type uint8;
+                }
+            }
+
+            case push-pbb-action {
+
+            }
+
+            case push-mpls-action {
+
+            }
+
+            case push-vlan-action {
+
+            }
+        }
+    }
+
+    grouping flow {
+        container match {
+            uses match:match;
+        }
+        list action {
+            key "order";
+            leaf order {
+                type int32;
+            }
+            uses action;
+        }
+    }
+
+    grouping flow-statistics {
+        leaf packet-count {
+            type yang:counter64;
+        } 
+
+        leaf byte-count {
+            type yang:counter64;
+        }
+
+        container duration {
+            leaf second {
+                type yang:counter64;
+            }
+            leaf nanosecond {
+                type yang:counter64;
+            }
+        }
+    }
+
+    grouping flow-table-statistics {
+        leaf active {
+            type yang:counter64;
+        } 
+
+        leaf lookup {
+            type yang:counter64;
+        }
+
+        leaf matched {
+            type yang:counter64;   
+        }
+    }
+}
\ No newline at end of file
similarity index 75%
rename from opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/opendaylight-flow-base.yang
rename to opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/match-types.yang
index 443d82f2e42bd13083ace2889b25574d46246fd1..54b46d5587af0e0c65841d03546d80aa7f58d5bb 100644 (file)
@@ -1,37 +1,36 @@
-module opendaylight-flow-base {
-    namespace "urn:opendaylight:flow:base";
-    prefix "flowbase";
+module opendaylight-match-types {
+    namespace "urn:opendaylight:model:match:types";
+    prefix "match";
 
-    import yang-ext {prefix ext;}
     import ietf-inet-types {prefix inet;}
     import ietf-yang-types {prefix yang;}
-    import opendaylight-inventory {prefix inv;}
     import opendaylight-l2-types {prefix l2t;}
 
     revision "2013-08-19" {
         description "Initial revision of flow service";
     }
 
+    grouping "mac-address-filter" {
+        leaf address {
+            mandatory true;
+            type yang:mac-address;
+        }
+        leaf mask {
+            type binary;
+        }
+    }
+
      /** Match Groupings **/
     grouping "ethernet-match-fields" {
         container ethernet-source {
-            //description "Ethernet source address.";
-            //presence "Match field is active and set";
-            leaf address {
-                mandatory true;
-                type yang:mac-address;
-            }
-            leaf mask {
-                type binary;
-            }
+            description "Ethernet source address.";
+            presence "Match field is active and set";
+            uses mac-address-filter;
         }
         container ethernet-destination {
             description "Ethernet destination address.";
             presence "Match field is active and set";
-            leaf address {
-                mandatory true;
-                type yang:mac-address;
-            }
+            uses mac-address-filter;
         }
         container ethernet-type {
             description "Ethernet frame type.";
@@ -64,8 +63,6 @@ module opendaylight-flow-base {
             description "VLAN priority.";
             type l2t:vlan-pcp;
         }
-        
-
     }
 
     grouping "ip-match-fields" {
@@ -106,7 +103,6 @@ module opendaylight-flow-base {
         }
     }
 
-
     grouping "udp-match-fields" {
         leaf udp-source-port {
             description "UDP source port.";
@@ -151,7 +147,7 @@ module opendaylight-flow-base {
         }
     }
 
-    grouping "arp-match-fields" {     
+    grouping "arp-match-fields" {
         leaf arp-source-transport-address {
             description "ARP source IPv4 address.";
             type inet:ipv4-prefix;
@@ -164,31 +160,19 @@ module opendaylight-flow-base {
         container arp-source-hardware-address {
             description "ARP source hardware address.";
             presence "Match field is active and set";
-            leaf address {
-                mandatory true;
-                type yang:mac-address;
-            }
-            leaf mask {
-                type binary;
-            }
+        uses mac-address-filter;
         }
         container arp-target-hardware-address {
             description "ARP target hardware address.";
             presence "Match field is active and set";
-            leaf address {
-                mandatory true;
-                type yang:mac-address;
-            }
-            leaf mask {
-                type binary;
-            }
+        uses mac-address-filter;
         }
     }
 
     grouping action {
         choice action {
             case output-action {
-                leaf output-node-connector {
+                leaf-list output-node-connector {
                     type string;
                 }
             }
@@ -241,48 +225,43 @@ module opendaylight-flow-base {
         }
     }
 
-    grouping flow {
-        leaf node {
-            type inv:node-id;
+
+    grouping match {
+        container "ethernet-match" {
+            uses "ethernet-match-fields";
         }
-        container match {
-            container "ethernet-match" {
-                uses "ethernet-match-fields";
-            }
-            container "vlan-match" {
-                uses "vlan-match-fields";
-            }
-            container "ip-match" {
-                uses "ip-match-fields";
-            }
-            container "ipv4-match" {
+        container "vlan-match" {
+            uses "vlan-match-fields";
+        }
+        container "ip-match" {
+            uses "ip-match-fields";
+        }
+        
+        choice layer-3-match {
+            case "ipv4-match" {
                 uses "ipv4-match-fields";
             }
-            container "ipv6-match" {
+            case "ipv6-match" {
                 uses "ipv6-match-fields";
             }
-            container "udp-match" {
+            case "arp-match" {
+                uses "arp-match-fields";
+            }
+        }
+        
+        choice layer-4-match {
+            case "udp-match" {
                 uses "udp-match-fields";
             }
-            container "tcp-match" {
+            case "tcp-match" {
                 uses "tcp-match-fields";
             }
-            container "sctp-match" {
+            case "sctp-match" {
                 uses "sctp-match-fields";
             }
-            container "icmpv4-match" {
-                uses "icmpv4-match-fields";
-            }
-            container "arp-match" {
-                uses "arp-match-fields";
-            }
         }
-        list action {
-            key "order";
-            leaf order {
-                type int32;
-            }
-            uses action;
+        container "icmpv4-match" {
+            uses "icmpv4-match-fields";
         }
     }
 }
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/flow-service.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/flow-service.yang
new file mode 100644 (file)
index 0000000..113cb12
--- /dev/null
@@ -0,0 +1,81 @@
+module sal-flow {
+    namespace "urn:opendaylight:flow:service";
+    prefix flow;
+
+    import yang-ext {prefix ext;}
+    import opendaylight-inventory {prefix inv;}
+    import ietf-inet-types {prefix inet;}
+    import opendaylight-flow-types {prefix types;}
+
+
+    revision "2013-08-19" {
+        description "Initial revision of flow service";
+    }
+
+
+    typedef flow-table-ref {
+        type instance-identifier;
+    }
+    
+    grouping node-flow {
+        leaf node {
+            type inv:node-ref;
+        }
+        leaf flow-table {
+            type flow-table-ref;
+        }
+        uses types:flow;
+    }
+
+    /** Base configuration structure **/
+    grouping flow-update {
+        container original-flow {
+            uses types:flow;
+        }
+        container updated-flow {
+            uses types:flow;
+        }
+    }
+
+    rpc add-flow {
+        input {
+            uses node-flow;
+        }
+    }
+
+    rpc remove-flow {
+        input {
+            uses node-flow;
+        }
+    }
+
+    rpc update-flow {
+        input {
+            uses node-flow;
+        }
+    }
+
+    notification flow-added {
+        uses node-flow;
+    }
+
+    notification flow-updated {
+        uses node-flow;
+    }
+
+    notification flow-removed {
+        uses node-flow;
+    }
+
+    augment "/inv:nodes/inv:node" {
+        ext:augment-identifier "flow-capable-node";
+        container flow-tables {
+            list table {
+                key "id";
+                leaf "id" {
+                    type inet:uri;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-config.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-config.yang
deleted file mode 100644 (file)
index a4ecf73..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-module opendaylight-flow-config {
-    namespace "urn:opendaylight:flow:config";
-    prefix flow;
-
-    import yang-ext {prefix ext;}
-    import opendaylight-inventory {prefix inv;}
-    import opendaylight-flow-base {prefix flowbase;}
-
-    revision "2013-08-19" {
-        description "Initial revision of flow service";
-    }
-
-    /** Base configuration structure 
-    container flows {
-        list flow {
-            uses flowbase:flow;
-        }
-    }
-
-    **/
-}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-service.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/opendaylight-flow-service.yang
deleted file mode 100644 (file)
index 0f01de5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-module opendaylight-flow-service {
-    namespace "urn:opendaylight:flow:service";
-    prefix flow;
-
-    import yang-ext {prefix ext;}
-    import opendaylight-inventory {prefix inv;}
-    import opendaylight-flow-base {prefix flowbase;}
-
-    revision "2013-08-19" {
-        description "Initial revision of flow service";
-    }
-
-    /** Base configuration structure **/
-    
-
-    grouping flow-update {
-        container original-flow {
-            uses flowbase:flow;
-        }
-        container updated-flow {
-            uses flowbase:flow;
-        }
-    }
-
-    rpc add-flow {
-        input {
-            uses flowbase:flow;
-        }
-    }
-
-    rpc remove-flow {
-        input {
-            uses flowbase:flow;
-        }
-    }
-
-    rpc update-flow {
-        input {
-            uses flow-update;
-        }
-    }
-
-    notification flow-added {
-        uses flowbase:flow;
-    }
-
-    notification flow-updated {
-        input {
-            uses flow-update;
-        }
-    }
-
-    notification flow-removed {
-        uses flowbase:flow;
-    }
-}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/packet-processing.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/packet-processing.yang
new file mode 100644 (file)
index 0000000..260de5f
--- /dev/null
@@ -0,0 +1,46 @@
+module packet-processing {
+    namespace "urn:opendaylight:packet:service";
+    prefix flow;
+
+    import opendaylight-inventory {prefix inv;}
+    import ietf-inet-types {prefix inet;}
+    import ietf-yang-types {prefix yang;} 
+    import opendaylight-l2-types {prefix types;}
+    
+    revision "2013-07-09" {
+        description "";
+    }
+
+    grouping raw-packet {
+       leaf ingress {
+               type inv:node-connector-ref;
+       }
+       leaf payload {
+               type binary;
+       }
+    }
+
+    grouping ethernet-packet {
+       leaf source {
+               type yang:mac-address;
+       }
+
+       leaf destination {
+               type yang:mac-address;
+       }
+    }
+
+
+    notification packet-received {
+       uses raw-packet;
+    }
+
+    rpc transmit-packet {
+       input {
+               leaf egress {
+                       type inv:node-connector-ref;
+               }
+               uses raw-packet;
+       }
+    }
+}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/flow-statistics.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/flow-statistics.yang
new file mode 100644 (file)
index 0000000..7e00a36
--- /dev/null
@@ -0,0 +1,70 @@
+module opendaylight-flow-statistics {
+    namespace "urn:opendaylight:flow:statistics";
+    prefix flowstat;
+
+    import yang-ext {prefix ext;}
+    import opendaylight-inventory {prefix inv;}
+    import opendaylight-flow-types {prefix flow-types;}
+    import sal-flow {prefix flow;}
+    import opendaylight-statistics-types {prefix stat-types;}
+
+    revision "2013-08-19" {
+        description "Initial revision of flow service";
+    }
+
+    rpc get-node-connector-statistics {
+        input {
+            leaf node {
+                ext:context-reference "node-context";
+                type inv:node-ref;
+            }
+            leaf node-connector {
+                type inv:node-connector-ref;
+            }
+        }
+        output {
+            uses stat-types:node-connector-statistics;
+        }
+    }
+
+    notification node-connector-statistics-updated {
+        uses stat-types:node-connector-statistics;
+    }
+
+    rpc get-flow-statistics {
+        input {
+            leaf node {
+                ext:context-reference "node-context";
+                type inv:node-ref;
+            }
+            uses flow-types:flow;
+        }
+        output {
+            uses flow-types:flow-statistics;
+        }
+    }
+
+    notification flow-statistics-updated {
+        uses flow-types:flow-statistics;
+    }
+
+    rpc get-flow-table-statistics {
+        input {
+            leaf node {
+                ext:context-reference "node-context";
+                type inv:node-ref;
+            }
+        }
+        output {
+            uses flow-types:flow-table-statistics;
+        }
+    }
+
+    notification flow-table-statistics-updated {
+        leaf flow-table {
+            type flow:flow-table-ref;
+        }
+        uses flow-types:flow-table-statistics;
+    }
+
+}
\ No newline at end of file
similarity index 54%
rename from opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/opendaylight-flow-statistics.yang
rename to opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/statistics-types.yang
index 3c1bb70e6886a5b27d16e915f45288abf5267099..47c4c9369e2ded77a471de29928e58e1fbef82df 100644 (file)
@@ -1,44 +1,18 @@
-module opendaylight-flow-statistics {
-    namespace "urn:opendaylight:flow:statistics";
-    prefix flowstat;
+module opendaylight-statistics-types {
+    namespace "urn:opendaylight:model:statistics:types";
+    prefix stat-types;
 
-    import yang-ext {prefix ext;}
-    import ietf-inet-types {prefix inet;}
-    import ietf-yang-types {prefix yang;}
-    import opendaylight-flow-base {prefix flow;}
     import opendaylight-inventory {prefix inv;}
 
+    
     revision "2013-08-19" {
         description "Initial revision of flow service";
     }
 
-    /*
-    augment "/flow:flows/flow:flow" {
-        ext:augment-identifier "flow-statistics";
+    
 
-        leaf packet-count {
-            type uint64;
-        } 
-
-        leaf byte-count {
-            type uint64;
-        }
-
-        container duration {
-            leaf second {
-                type uint64;
-            }
-            leaf nanosecond {
-                type uint64;
-            }
-        }
-    }
-    */
-
-    augment "/inv:nodes/inv:node/inv:node-connector" {
-        ext:augment-identifier "node-connector-statistics";
-
-        container packets {
+    grouping node-connector-statistics {
+       container packets {
             leaf received {
                 type uint64;
             }
@@ -78,7 +52,5 @@ module opendaylight-flow-statistics {
         leaf collision-count {
             type uint64;
         }
-
     }
-
 }
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang b/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang
new file mode 100644 (file)
index 0000000..a114c62
--- /dev/null
@@ -0,0 +1,69 @@
+module opendaylight-inventory {
+    namespace "urn:opendaylight:inventory";
+    prefix inv;
+
+    import yang-ext {prefix ext;}
+    import ietf-inet-types {prefix inet;}
+    import ietf-yang-types {prefix yang;}
+
+
+    revision "2013-08-19" {
+        description "Initial revision of Inventory model";
+    }
+
+    typedef node-id {
+        type inet:uri;
+    }
+
+    typedef node-connector-id {
+        type inet:uri;
+    }
+
+    typedef node-ref {
+        type instance-identifier;
+    }
+
+    typedef node-connector-ref {
+        type instance-identifier;
+    }
+
+    identity node-context {
+        description "Identity used to mark node context";
+    }
+
+    identity node-connector-context {
+
+    }
+
+       grouping node {
+               leaf id {
+            type node-id;
+        }
+       }
+
+       grouping node-connector {
+               leaf id {
+            type node-connector-id;
+               }
+       }
+
+
+
+
+    /** Base structure **/
+    container nodes {
+        list node {
+            key "id";
+            ext:context-instance "node-context";
+
+                       uses node;
+
+            list "node-connector" {
+                key "id";
+                ext:context-instance "node-connector-context";
+                
+                use node-connector;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/opendaylight-inventory.yang b/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/opendaylight-inventory.yang
deleted file mode 100644 (file)
index fa9de4a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-module opendaylight-inventory {
-    namespace "urn:opendaylight:inventory";
-    prefix flow;
-
-    import yang-ext {prefix ext;}
-    import ietf-inet-types {prefix inet;}
-    import ietf-yang-types {prefix yang;}
-
-
-    revision "2013-08-19" {
-        description "Initial revision of Inventory model";
-    }
-
-    typedef node-id {
-        type inet:uri;
-    }
-
-    typedef node-connector-id {
-        type inet:uri;
-    }
-
-    /** Base structure **/
-    container nodes {
-        list node {
-            key id;
-            leaf id {
-                type node-id;
-            }
-            list node-connector {
-                key "id";
-                leaf id {
-                    type node-connector-id;
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
index fc6fb8eaed40561c666d5468484cf89e6cc84d73..0442e8f9b2646d8f9b4d159fdfff7ea1e47d0287 100644 (file)
@@ -28,6 +28,7 @@
                <yang.version>0.5.7-SNAPSHOT</yang.version>
                <maven.bundle.version>2.4.0</maven.bundle.version>
         <releaseplugin.version>2.3.2</releaseplugin.version>
+        <guava.version>14.0.1</guava.version>
        </properties>
 
     <pluginRepositories>
           <id>central2</id>
           <name>central2</name>
           <url>http://repo2.maven.org/maven2</url>
+          <snapshots>
+              <enabled>false</enabled>
+          </snapshots>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
         </pluginRepository>
         <pluginRepository>
             <id>opendaylight.snapshot</id>
         <id>central2</id>
         <name>central2</name>
         <url>http://repo2.maven.org/maven2</url>
+        <snapshots>
+            <enabled>false</enabled>
+        </snapshots>
+        <releases>
+            <enabled>true</enabled>
+        </releases>
       </repository>
       <repository>
         <id>central</id>
         <name>central</name>
         <url>http://repo1.maven.org/maven2</url>
+        <snapshots>
+            <enabled>false</enabled>
+        </snapshots>
+        <releases>
+            <enabled>true</enabled>
+        </releases>
       </repository>
                <!-- EBR release -->
                <!-- http://repository.springsource.com/maven/bundles/release -->
                        <dependency>
                                <groupId>com.google.guava</groupId>
                                <artifactId>guava</artifactId>
-                               <version>14.0.1</version>
-                               <type>jar</type>
+                <version>${guava.version}</version>
                        </dependency>
                        <dependency>
                                <groupId>org.slf4j</groupId>
index b8ba6055246a8b319f6bb25ee2161504e1cec104..549e427d82e816fb4374d3b80b3b44e2b9aeee1d 100644 (file)
@@ -93,7 +93,6 @@
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <type>jar</type>
                </dependency>
                <dependency>
                        <groupId>org.reflections</groupId>
index fa3536335736d58af14725978158451eba3291a5..0965e2523109f5d24b9f23bc055523dd05f93e90 100644 (file)
@@ -36,7 +36,6 @@
         <dependency>\r
             <groupId>com.google.guava</groupId>\r
             <artifactId>guava</artifactId>\r
-            <type>jar</type>\r
         </dependency>\r
     </dependencies>\r
 </project>\r
index 60330c1ad46b4709c56267578b411ccba2d4aefa..1390f94b494c423198abde7736b4e77f965046d0 100644 (file)
@@ -1104,7 +1104,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
     @Override
     public Set<Node> getNodes() {
         return (nodeProps != null) ? new HashSet<Node>(nodeProps.keySet())
-                : null;
+                : new HashSet<Node>();
     }
 
     /*
index 9524a76b012a1cb2d6a568aba3c51cb3ad975ac9..3fd292bdf263c9954e8e5076466666eb25e9e3a7 100644 (file)
@@ -464,8 +464,10 @@ one.f.switchmanager.subnetGatewayConfig = {
         }, 
         modal: {
             modal: "one_f_switchmanager_subnetGatewayConfig_id_modal_modal",
-                       ports : "one_f_switchmanager_subnetGatewayConfig_id_modal_ports",
+            ports : "one_f_switchmanager_subnetGatewayConfig_id_modal_ports",
             save: "one_f_switchmanager_subnetGatewayConfig_id_modal_save",
+            remove: "one_f_switchmanager_subnetGatewayConfig_id_modal_remove",
+            cancel: "one_f_switchmanager_subnetGatewayConfig_id_modal_cancel",
             form: {
                 name : "one_f_switchmanager_subnetGatewayConfig_id_modal_form_gatewayname",
                 gatewayIPAddress : "one_f_switchmanager_subnetGatewayConfig_id_modal_form_gatewayipaddress",
@@ -493,33 +495,19 @@ one.f.switchmanager.subnetGatewayConfig = {
                 $dashlet.append($button);
 
                 // Delete gateway ip address button
-                var button = one.lib.dashlet.button.single("Delete Gateway IP Address",
-                    one.f.switchmanager.subnetGatewayConfig.id.dashlet.removeIPAddress, "btn-danger", "btn-mini");
+                var button = one.lib.dashlet.button.single("Remove Gateway IP Address",
+                one.f.switchmanager.subnetGatewayConfig.id.dashlet.removeIPAddress, "btn-danger", "btn-mini");
                 var $button = one.lib.dashlet.button.button(button);
                 $button.click(function() {
-                    var requestData = {};
                     var gatewaysToDelete = [];
                     var checkedCheckBoxes = $("#" + one.f.switchmanager.subnetGatewayConfig.id.dashlet.datagrid).find("tbody input:checked")
                     checkedCheckBoxes.each(function(index, value) {
                         gatewaysToDelete.push(checkedCheckBoxes[index].id);
                     });
                     if (checkedCheckBoxes.size() === 0) {
-                       alert('Please select at least one gateway');
-                       return false;
-                    }
-                    if (gatewaysToDelete.length > 0) {
-                        requestData["gatewaysToDelete"] = gatewaysToDelete.toString();
-                        var url = one.f.switchmanager.rootUrl + "/subnetGateway/delete";
-                        one.f.switchmanager.subnetGatewayConfig.ajax.main(url, requestData, function(response) {
-                            if (response.status == true) {
-                                // refresh dashlet by passing dashlet div as param 
-                                one.lib.alert("Subnet Gateway(s) successfully removed");
-                            } else {
-                                one.lib.alert(response.message);
-                            }
-                            one.f.switchmanager.subnetGatewayConfig.dashlet($("#right-bottom .dashlet"));
-                        });
+                        return false;
                     }
+                    one.f.switchmanager.subnetGatewayConfig.modal.removeMultiple.dialog(gatewaysToDelete)
                 });
                 $dashlet.append($button);
 
@@ -725,6 +713,64 @@ one.f.switchmanager.subnetGatewayConfig = {
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
+        },
+        removeMultiple: {
+            dialog: function(gatewaysToDelete) {
+                var h3 = 'Remove Gateway IP Address';
+                
+                var footer = one.f.switchmanager.subnetGatewayConfig.modal.removeMultiple.footer();
+                var $body = one.f.switchmanager.subnetGatewayConfig.modal.removeMultiple.body(gatewaysToDelete);
+                var $modal = one.lib.modal.spawn(one.f.switchmanager.subnetGatewayConfig.id.modal.modal, h3, $body, footer);
+
+                // bind close button
+                $('#'+one.f.switchmanager.subnetGatewayConfig.id.modal.cancel, $modal).click(function() {
+                    $modal.modal('hide');
+                });
+
+                // bind remove rule button
+                $('#'+one.f.switchmanager.subnetGatewayConfig.id.modal.remove, $modal).click(this, function(e) {
+                    var requestData = {};
+                    if (gatewaysToDelete.length > 0) {
+                        requestData["gatewaysToDelete"] = gatewaysToDelete.toString();
+                        var url = one.f.switchmanager.rootUrl + "/subnetGateway/delete";
+                        one.f.switchmanager.subnetGatewayConfig.ajax.main(url, requestData, function(response) {
+                            $modal.modal('hide');
+                            if (response.status == true) {
+                                // refresh dashlet by passing dashlet div as param 
+                                one.lib.alert("Gateway IP Address(es) successfully removed");
+                            } else {
+                                alert(response.message);
+                            }
+                            one.f.switchmanager.subnetGatewayConfig.dashlet($("#right-bottom .dashlet"));
+                        });
+                    }
+                });
+                $modal.modal();
+            },
+            footer : function() {
+                var footer = [];
+                var remove = one.lib.dashlet.button.single('Remove Gateway IP Address',one.f.switchmanager.subnetGatewayConfig.id.modal.remove, 'btn-danger', '');
+                var $remove = one.lib.dashlet.button.button(remove);
+                footer.push($remove);
+
+                var cancel = one.lib.dashlet.button.single('Cancel', one.f.switchmanager.subnetGatewayConfig.id.modal.cancel, '', '');
+                var $cancel = one.lib.dashlet.button.button(cancel);
+                footer.push($cancel);
+
+                return footer;
+            },
+            body : function (gatewayList) {
+                var $p = $(document.createElement('p'));
+                var p = 'Remove the following Gateway IP Address(es)?';
+                //creata a BS label for each rule and append to list
+                $(gatewayList).each(function(){
+                    var $span = $(document.createElement('span'));
+                    $span.append(this);
+                    p += '<br/>' + $span[0].outerHTML;
+                });
+                $p.append(p);
+                return $p;
+            }
         }
     },
     // data functions
@@ -769,7 +815,7 @@ one.f.switchmanager.subnetGatewayConfig = {
                                 nodePortHtml += "&nbsp;";
                                 nodePortHtml += '<a href="#" id=' + encodeURIComponent(nodePortID) + 
                                     ' gatewayName=' + tableRow["name"] + 
-                                    ' onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Delete</a>';
+                                    ' onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Remove</a>';
                                 nodePortHtml += "<br/>";
                             });
                             nodePortHtml += "</div>";
@@ -823,7 +869,7 @@ one.f.switchmanager.subnetGatewayConfig = {
                     aTag.addEventListener("mouseover", function(evt) {
                         evt.target.style.cursor = "pointer";
                     }, false);
-                    aTag.innerHTML = "Delete";
+                    aTag.innerHTML = "Remove";
                     $nodePortsContainer.append(aTag);
                     $nodePortsContainer.append("<br/>");
                 }
@@ -874,6 +920,8 @@ one.f.switchmanager.staticRouteConfig = {
         modal: {
             modal: "one_f_switchmanager_staticRouteConfig_id_modal_modal",
             save: "one_f_switchmanager_staticRouteConfig_id_modal_save",
+            cancel: "one_f_switchmanager_staticRouteConfig_id_modal_cancel",
+            remove: "one_f_switchmanager_staticRouteConfig_id_modal_remove",
             form: {
                 routeName : "one_f_switchmanager_staticRouteConfig_id_modal_form_routename",
                 staticRoute : "one_f_switchmanager_staticRouteConfig_id_modal_form_staticroute",
@@ -898,33 +946,18 @@ one.f.switchmanager.staticRouteConfig = {
                 $dashlet.append($button);
 
                 // Delete static route button
-                var button = one.lib.dashlet.button.single("Delete Static Route(s)", one.f.switchmanager.staticRouteConfig.id.dashlet.remove, "btn-danger", "btn-mini");
+                var button = one.lib.dashlet.button.single("Remove Static Route", one.f.switchmanager.staticRouteConfig.id.dashlet.remove, "btn-danger", "btn-mini");
                 var $button = one.lib.dashlet.button.button(button);
                 $button.click(function() {
-                    var requestData = {};
                     var routesToDelete = [];
-                    //var checkedCheckBoxes = $("input:checked", $(this).closest(".dashlet").find("table"));
                     var checkedCheckBoxes = $("#" + one.f.switchmanager.staticRouteConfig.id.dashlet.datagrid).find("tbody input:checked");
                     checkedCheckBoxes.each(function(index, value) {
                         routesToDelete.push(checkedCheckBoxes[index].id);
                     });
                     if (checkedCheckBoxes.size() === 0) {
-                       alert('Please select at least one static route');
-                       return false;
-                    }
-                    if (routesToDelete.length > 0) {
-                        requestData["routesToDelete"] = routesToDelete.toString();
-                        var url = one.f.switchmanager.rootUrl + "/staticRoute/delete";
-                        one.f.switchmanager.staticRouteConfig.ajax.main(url, requestData, function(response) {
-                            if (response.status == true) {
-                                // refresh dashlet by passing dashlet div as param 
-                                one.lib.alert("Static Routes(s) successfully removed");
-                            } else {
-                                one.lib.alert(response.message);
-                            }
-                            one.f.switchmanager.staticRouteConfig.dashlet($("#left-bottom .dashlet"));
-                        });
+                        return false;
                     }
+                    one.f.switchmanager.staticRouteConfig.modal.removeMultiple.dialog(routesToDelete);
                 });
                 $dashlet.append($button);
             }
@@ -1033,6 +1066,64 @@ one.f.switchmanager.staticRouteConfig = {
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
+        },
+        removeMultiple: {
+            dialog: function(routesToDelete) {
+                var h3 = 'Remove Static Route';
+                
+                var footer = one.f.switchmanager.staticRouteConfig.modal.removeMultiple.footer();
+                var $body = one.f.switchmanager.staticRouteConfig.modal.removeMultiple.body(routesToDelete);
+                var $modal = one.lib.modal.spawn(one.f.switchmanager.staticRouteConfig.id.modal.modal, h3, $body, footer);
+
+                // bind close button
+                $('#'+one.f.switchmanager.staticRouteConfig.id.modal.cancel, $modal).click(function() {
+                    $modal.modal('hide');
+                });
+
+                // bind remove rule button
+                $('#'+one.f.switchmanager.staticRouteConfig.id.modal.remove, $modal).click(this, function(e) {
+                    if (routesToDelete.length > 0) {
+                        var requestData = {};
+                        requestData["routesToDelete"] = routesToDelete.toString();
+                        var url = one.f.switchmanager.rootUrl + "/staticRoute/delete";
+                        one.f.switchmanager.staticRouteConfig.ajax.main(url, requestData, function(response) {
+                            $modal.modal('hide');
+                            if (response.status == true) {
+                                // refresh dashlet by passing dashlet div as param 
+                                one.lib.alert("Static Route(s) successfully removed");
+                            } else {
+                                alert(response.message);
+                            }
+                            one.f.switchmanager.staticRouteConfig.dashlet($("#left-bottom .dashlet"));
+                        });
+                    }
+                });
+                $modal.modal();
+            },
+            footer : function() {
+                var footer = [];
+                var remove = one.lib.dashlet.button.single('Remove Static Route',one.f.switchmanager.staticRouteConfig.id.modal.remove, 'btn-danger', '');
+                var $remove = one.lib.dashlet.button.button(remove);
+                footer.push($remove);
+
+                var cancel = one.lib.dashlet.button.single('Cancel', one.f.switchmanager.staticRouteConfig.id.modal.cancel, '', '');
+                var $cancel = one.lib.dashlet.button.button(cancel);
+                footer.push($cancel);
+
+                return footer;
+            },
+            body : function (staticRouteList) {
+                var $p = $(document.createElement('p'));
+                var p = 'Remove the following Static Route(s)?';
+                //creata a BS label for each rule and append to list
+                $(staticRouteList).each(function(){
+                    var $span = $(document.createElement('span'));
+                    $span.append(this);
+                    p += '<br/>' + $span[0].outerHTML;
+                });
+                $p.append(p);
+                return $p;
+            }
         }
     },
     // data functions
@@ -1105,6 +1196,8 @@ one.f.switchmanager.spanPortConfig = {
         modal: {
             modal: "one_f_switchmanager_spanPortConfig_id_modal_modal",
             save: "one_f_switchmanager_spanPortConfig_id_modal_save",
+            cancel: "one_f_switchmanager_spanPortConfig_id_modal_cancel",
+            remove: "one_f_switchmanager_spanPortConfig_id_modal_remove",
             form: {
                 name : "one_f_switchmanager_spanPortConfig_id_modal_form_name",
                 nodes : "one_f_switchmanager_spanPortConfig_id_modal_form_nodes",
@@ -1133,34 +1226,19 @@ one.f.switchmanager.spanPortConfig = {
                 $dashlet.append($button);
 
                 // Delete span port button
-                var button = one.lib.dashlet.button.single("Delete SPAN Port(s)", one.f.switchmanager.spanPortConfig.id.dashlet.remove, "btn-danger", "btn-mini");
+                var button = one.lib.dashlet.button.single("Remove SPAN Port", one.f.switchmanager.spanPortConfig.id.dashlet.remove, "btn-danger", "btn-mini");
                 var $button = one.lib.dashlet.button.button(button);
                 $button.click(function() {
-
+                    var spanPortsToDelete = [];
                     var checkedCheckBoxes = $("#" + one.f.switchmanager.spanPortConfig.id.dashlet.datagrid).find("tbody input:checked");
-                    if (checkedCheckBoxes.length > 0) {
-                        var spanPortsToDelete = "";
-                        checkedCheckBoxes.each(function(index, value) {
-                            spanPortsToDelete += decodeURIComponent(checkedCheckBoxes[index].getAttribute("spanPort")) + "###";
-                        });
-                        if (checkedCheckBoxes.size() === 0) {
-                               alert('Please select at least one SPAN port');
-                               return false;
-                        }
-
-                        var requestData = {};
-                        requestData["spanPortsToDelete"] = spanPortsToDelete;
-                        var url = one.f.switchmanager.rootUrl + "/spanPorts/delete";
-                        one.f.switchmanager.spanPortConfig.ajax.main(url, requestData, function(response) {
-                            if (response.status == true) {
-                                // refresh dashlet by passing dashlet div as param
-                                one.lib.alert("Span Port(s) successfully removed");
-                            } else {
-                                one.lib.alert(response.message);
-                            }
-                            one.f.switchmanager.spanPortConfig.dashlet($("#right-bottom .dashlet"));
-                        });
+                    
+                    if (checkedCheckBoxes.size() === 0) {
+                        return false;
                     }
+                    checkedCheckBoxes.each(function(index, value) {
+                        spanPortsToDelete.push(decodeURIComponent(checkedCheckBoxes[index].getAttribute("spanPort")));
+                    });
+                    one.f.switchmanager.spanPortConfig.modal.removeMultiple.dialog(spanPortsToDelete);
                 });
                 $dashlet.append($button);
             }
@@ -1290,6 +1368,69 @@ one.f.switchmanager.spanPortConfig = {
             var $saveButton = one.lib.dashlet.button.button(saveButton);
             footer.push($saveButton);
             return footer;
+        },
+        removeMultiple: {
+            dialog: function(spanPortsToDelete) {
+                var h3 = 'Remove Span Port';
+                
+                var footer = one.f.switchmanager.spanPortConfig.modal.removeMultiple.footer();
+                var $body = one.f.switchmanager.spanPortConfig.modal.removeMultiple.body(spanPortsToDelete);
+                var $modal = one.lib.modal.spawn(one.f.switchmanager.spanPortConfig.id.modal.modal, h3, $body, footer);
+
+                // bind close button
+                $('#'+one.f.switchmanager.spanPortConfig.id.modal.cancel, $modal).click(function() {
+                    $modal.modal('hide');
+                });
+
+                // bind remove rule button
+                $('#'+one.f.switchmanager.spanPortConfig.id.modal.remove, $modal).click(this, function(e) {
+                    var requestData = {};
+                    var spanPorts="";
+                    $(spanPortsToDelete).each(function(){
+                        spanPorts = spanPorts + "###" + this.toString();
+                    });
+                    requestData["spanPortsToDelete"] = spanPorts.slice(3,spanPorts.length);
+                    
+                    var url = one.f.switchmanager.rootUrl + "/spanPorts/delete";
+                    one.f.switchmanager.spanPortConfig.ajax.main(url, requestData, function(response) {
+                        $modal.modal('hide');
+                        if (response.status == true) {
+                            // refresh dashlet by passing dashlet div as param
+                            one.lib.alert("Span Port(s) successfully removed");
+                        } else {
+                            alert(response.message);
+                        }
+                        one.f.switchmanager.spanPortConfig.dashlet($("#right-bottom .dashlet"));
+                    });
+                });
+                $modal.modal();
+            },
+            footer : function() {
+                var footer = [];
+                var remove = one.lib.dashlet.button.single('Remove SPAN Port',one.f.switchmanager.spanPortConfig.id.modal.remove, 'btn-danger', '');
+                var $remove = one.lib.dashlet.button.button(remove);
+                footer.push($remove);
+
+                var cancel = one.lib.dashlet.button.single('Cancel', one.f.switchmanager.spanPortConfig.id.modal.cancel, '', '');
+                var $cancel = one.lib.dashlet.button.button(cancel);
+                footer.push($cancel);
+
+                return footer;
+            },
+            body : function (spanPortToDelete) {
+                var $p = $(document.createElement('p'));
+                var p = 'Remove the following Span Port(s)?';
+                //creata a BS label for each rule and append to list
+
+                var spanPortList = JSON.parse("["+spanPortToDelete.toString()+"]");
+                $(spanPortList).each(function(){
+                    var $span = $(document.createElement('span'));
+                    $span.append(this.nodeId+"-"+this.spanPort);
+                    p += '<br/>' + $span[0].outerHTML;
+                });
+                $p.append(p);
+                return $p;
+            }
         }
     },
     // data functions
index b8eb29aaa7f9742f1bb2a0da2a8cb8ac6342e479..8bc2a9937809491816023d38169af95822d8cba7 100644 (file)
@@ -336,32 +336,18 @@ one.f.flows = {
                 $button.click(function() {
                     var checkedCheckBoxes = $('.flowEntry[type=checkbox]:checked');
                     if (checkedCheckBoxes.size() === 0) {
-                       alert('Please select at least one flow');
-                       return false;
+                        return false;
                     }
                     
                     var requestData = [];
                     
-                    var resource = {};
                     checkedCheckBoxes.each(function(index, value) {
                         var flowEntry = {};
                         flowEntry['name'] = checkedCheckBoxes[index].name;
                         flowEntry['node'] = checkedCheckBoxes[index].getAttribute("node");
                         requestData.push(flowEntry);  
                     });
-                    resource['body'] = JSON.stringify(requestData);
-
-                    $.post(one.f.address.root+one.f.address.flows.deleteFlows, resource, function(response) {
-                        if(response == "Success") {
-                            one.lib.alert("Flow(s) successfully removed");                            
-                        } else {
-                            one.lib.alert(response);
-                        }
-                        one.main.dashlet.right.bottom.empty();
-                        one.f.detail.dashlet(one.main.dashlet.right.bottom);
-                        one.main.dashlet.left.top.empty();
-                        one.f.flows.dashlet(one.main.dashlet.left.top);
-                    });                    
+                    one.f.flows.modal.removeMultiple.dialog(requestData);
                 });
                 $dashlet.append($button);
 
@@ -491,7 +477,7 @@ one.f.flows = {
     modal : {
         dialog : {
             initialize : function(id, node) {
-                var h3 = "Remove Flow?";
+                var h3 = "Remove Flow";
                 var $p = one.f.flows.modal.dialog.body(id);
                 var footer = one.f.flows.modal.dialog.footer();
                 var $modal = one.lib.modal.spawn(one.f.flows.id.modal.dialog.modal, h3, $p, footer);
@@ -622,7 +608,7 @@ one.f.flows = {
             one.f.flows.modal.ajax.saveflow(resource, function(data) {
                 if (data == "Success") {
                     $modal.modal('hide');
-                    one.lib.alert('Flow added');
+                    one.lib.alert('Flow Entry added');
                     one.main.dashlet.left.top.empty();
                     one.f.flows.dashlet(one.main.dashlet.left.top);
                 } else {
@@ -1232,6 +1218,67 @@ one.f.flows = {
             footer.push($closeButton);
 
             return footer;
+        },
+        removeMultiple: {
+            dialog: function(flows) {
+                var h3 = 'Remove Flow Entry';
+                var flowList = [];
+                for (var i = 0; i < flows.length; i++) {
+                    flowList.push(flows[i]["name"]);
+                }
+                var footer = one.f.flows.modal.removeMultiple.footer();
+                var $body = one.f.flows.modal.removeMultiple.body(flowList);
+                var $modal = one.lib.modal.spawn(one.f.flows.id.modal.dialog.modal, h3, $body, footer);
+
+                // bind close button
+                $('#'+one.f.flows.id.modal.dialog.close, $modal).click(function() {
+                    $modal.modal('hide');
+                });
+
+                // bind remove rule button
+                $('#'+one.f.flows.id.modal.dialog.remove, $modal).click(this, function(e) {
+                    var resource = {};
+                    resource['body'] = JSON.stringify(flows);
+
+                    $.post(one.f.address.root+one.f.address.flows.deleteFlows, resource, function(response) {
+                        $modal.modal('hide');
+                        if(response == "Success") {
+                            one.lib.alert("Flow Entry(s) successfully removed");
+                        } else {
+                            one.lib.alert(response);
+                        }
+                        one.main.dashlet.right.bottom.empty();
+                        one.f.detail.dashlet(one.main.dashlet.right.bottom);
+                        one.main.dashlet.left.top.empty();
+                        one.f.flows.dashlet(one.main.dashlet.left.top);
+                    });
+                });
+                $modal.modal();
+            },
+            footer : function() {
+                var footer = [];
+                var remove = one.lib.dashlet.button.single('Remove Flow Entry',one.f.flows.id.modal.dialog.remove, 'btn-danger', '');
+                var $remove = one.lib.dashlet.button.button(remove);
+                footer.push($remove);
+
+                var cancel = one.lib.dashlet.button.single('Cancel', one.f.flows.id.modal.dialog.close, '', '');
+                var $cancel = one.lib.dashlet.button.button(cancel);
+                footer.push($cancel);
+
+                return footer;
+            },
+            body : function (flows) {
+                var $p = $(document.createElement('p'));
+                var p = 'Remove the following Flow Entry(s)?';
+                //creata a BS label for each rule and append to list
+                $(flows).each(function(){
+                    var $span = $(document.createElement('span'));
+                    $span.append(this);
+                    p += '<br/>' + $span[0].outerHTML;
+                });
+                $p.append(p);
+                return $p;
+            }
         }
     },
     ajax : {
@@ -1373,4 +1420,4 @@ $('.dash .nav a', '#main').click(function() {
 // activate first tab on each dashlet
 $('.dash .nav').each(function(index, value) {
     $($(value).find('li')[0]).find('a').click();
-});
+});
\ No newline at end of file
index d9aa03ea6209a66fa4548ef091694b1e63dd633c..3b0b85c065cc8cf2de88205525aaaf6f89e84868 100644 (file)
@@ -56,7 +56,7 @@ public class DaylightWebAdmin {
             return null;
         }
 
-        List<ClusterNodeBean> clusters = new ArrayList<ClusterNodeBean>();
+        List<ClusterNodeBean> clusterNodes = new ArrayList<ClusterNodeBean>();
 
         List<InetAddress> controllers = clusterServices.getClusteredControllers();
         for (InetAddress controller : controllers) {
@@ -64,25 +64,24 @@ public class DaylightWebAdmin {
             if (controller.equals(clusterServices.getMyAddress())) {
                 clusterBeanBuilder.highlightMe();
             }
-            if (clusterServices.amICoordinator()) {
+            if (clusterServices.getCoordinatorAddress().equals(controller)) {
                 clusterBeanBuilder.iAmCoordinator();
             }
-
-            clusters.add(clusterBeanBuilder.build());
+            clusterNodes.add(clusterBeanBuilder.build());
         }
 
-        return gson.toJson(clusters);
+        return gson.toJson(clusterNodes);
     }
 
     /**
      * Return nodes connected to controller {controller}
-     * @param cluster
+     * @param controller
      *            - byte[] of the address of the controller
      * @return List<NodeBean>
      */
     @RequestMapping("/cluster/controller/{controller}")
     @ResponseBody
-    public String getNodesConnectedToController(@PathVariable("controller") String cluster) {
+    public String getNodesConnectedToController(@PathVariable("controller") String controller) {
         IClusterGlobalServices clusterServices = (IClusterGlobalServices) ServiceHelper.getGlobalInstance(
                 IClusterGlobalServices.class, this);
         if (clusterServices == null) {
@@ -99,18 +98,20 @@ public class DaylightWebAdmin {
             return null;
         }
 
-        byte[] address = gson.fromJson(cluster, byte[].class);
-        InetAddress clusterAddress = null;
+        byte[] address = gson.fromJson(controller, byte[].class);
+        InetAddress controllerAddress = null;
         try {
-            clusterAddress = InetAddress.getByAddress(address);
+            controllerAddress = InetAddress.getByAddress(address);
         } catch (UnknownHostException e) {
             return null;
         }
-        InetAddress thisCluster = clusterServices.getMyAddress();
 
         List<NodeBean> result = new ArrayList<NodeBean>();
 
-        Set<Node> nodes = connectionManager.getNodes(thisCluster);
+        Set<Node> nodes = connectionManager.getNodes(controllerAddress);
+        if (nodes == null) {
+            return gson.toJson(result);
+        }
         for (Node node : nodes) {
             Description description = (Description) switchManager.getNodeProp(node, Description.propertyName);
             NodeBean nodeBean;
index 599922d391b12284b87544615e6022a9396d69ed..85e4d472ef0d5f89e3e274543e4040a3b2e22ae2 100644 (file)
@@ -515,9 +515,6 @@ one.main.cluster = {
                close : 'one-main-cluster-id-close',
                datagrid : 'one-main-cluster-id-datagrid'
        },
-       registry : { // one.main.cluster.registry
-               cluster : undefined
-       },
        initialize : function() {
                var h3 = 'Cluster Management';
                var footer = one.main.cluster.footer();
@@ -544,7 +541,7 @@ one.main.cluster = {
                                        if ($tr.find('td:nth-child(1)').attr('colspan') === '1') {
                                                return false;
                                        }
-                                       var address = one.main.cluster.registry.cluster[$tr.index()];
+                                       var address = $tr.find('.ux-id').text();
                                        one.main.cluster.nodes.initialize(address);
                                });
                        });
@@ -558,7 +555,14 @@ one.main.cluster = {
                var registry = [];
                $(data).each(function(idx, val) {
                        var name = val.name;
+                       var address = val.address;
+                       var $registry = $(document.createElement('span'));
+                       $registry
+                               .append(JSON.stringify(address))
+                               .css('display', 'none')
+                               .addClass('ux-id');
                        name = one.lib.dashlet.label(name, null)[0].outerHTML;
+                       name += $registry[0].outerHTML;
                        if (val.me === true) {
                                var me = one.lib.dashlet.label('*', 'label-inverse')[0].outerHTML;
                                name += '&nbsp;'+me;
@@ -570,9 +574,7 @@ one.main.cluster = {
                        tdata.push({
                                'controller' : name
                        });
-                       registry.push(val.address);
                });
-               one.main.cluster.registry.cluster = registry;
                var source = new StaticDataSource({
                        columns : [
                                {
@@ -613,7 +615,7 @@ one.main.cluster.nodes = {
                });
                
                // body
-               $.getJSON('/admin/cluster/controller/'+JSON.stringify(address), function(data) {
+               $.getJSON('/admin/cluster/controller/'+address, function(data) {
                        var $gridHTML = one.lib.dashlet.datagrid.init(one.main.cluster.nodes.id.datagrid, {
                                searchable: true,
                                filterable: false,