Various gui & test script tweaks.

Change-Id: I62d8c560d4d533cd6d38ee9388a2a2e0400f51a2
diff --git a/tools/test/bin/onos-local b/tools/test/bin/onos-local
new file mode 100755
index 0000000..acf090c
--- /dev/null
+++ b/tools/test/bin/onos-local
@@ -0,0 +1,7 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# ONOS local karaf server start.
+# -----------------------------------------------------------------------------
+
+unset KARAF_HOME
+karaf "$@"
\ No newline at end of file
diff --git a/tools/test/cells/tom b/tools/test/cells/tom
index 9db8758..cba30f3 100644
--- a/tools/test/cells/tom
+++ b/tools/test/cells/tom
@@ -1,8 +1,8 @@
 # Thomas' VirtualBox-based single ONOS instance & ONOS mininet box
 
 export ONOS_NIC=192.168.56.*
-export OC1="192.168.56.101"
-export OCN="192.168.56.103"
+export OC1="192.168.56.11"
+export OCN="192.168.56.7"
 export OCI="${OC1}"
 
-export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-optical
+export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-mobility
diff --git a/tools/test/cells/tom3 b/tools/test/cells/tom3
new file mode 100644
index 0000000..17d64be
--- /dev/null
+++ b/tools/test/cells/tom3
@@ -0,0 +1,10 @@
+# Thomas' VirtualBox-based 3 ONOS instances & ONOS mininet box
+
+export ONOS_NIC=192.168.56.*
+export OC1="192.168.56.11"
+export OC2="192.168.56.12"
+export OC3="192.168.56.13"
+export OCN="192.168.56.7"
+export OCI="${OC1}"
+
+export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-mobility
diff --git a/tools/test/topos/att-onos.py b/tools/test/topos/att-onos.py
new file mode 100644
index 0000000..930cd37
--- /dev/null
+++ b/tools/test/topos/att-onos.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+import sys
+
+from mininet.net import Mininet
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.node import RemoteController
+from mininet.link import TCLink
+
+from attmpls import AttMplsTopo
+
+setLogLevel( 'info' )
+
+def run(controllers=[ '127.0.0.1' ]):
+    net = Mininet( topo=AttMplsTopo(), link=TCLink, build=False, autoSetMacs=True )
+    ctrl_count = 0
+    for controllerIP in controllers:
+        net.addController( 'c%d' % ctrl_count, RemoteController, ip=controllerIP )
+    net.build()
+    net.start()
+    CLI( net )
+    net.stop()
+
+if __name__ == '__main__':
+    if len( sys.argv ) > 1:
+        controllers = sys.argv[ 1: ]
+    else:
+        print 'Usage: att-onos.py <c0 IP> <c1 IP> ...'
+        exit( 1 )
+    run( controllers )
diff --git a/tools/test/topos/att-mpls.json b/tools/test/topos/attmpls.json
similarity index 100%
rename from tools/test/topos/att-mpls.json
rename to tools/test/topos/attmpls.json
diff --git a/tools/test/topos/att-mpls.py b/tools/test/topos/attmpls.py
similarity index 100%
rename from tools/test/topos/att-mpls.py
rename to tools/test/topos/attmpls.py
diff --git a/web/api/src/main/java/org/onlab/onos/rest/ConfigResource.java b/web/api/src/main/java/org/onlab/onos/rest/ConfigResource.java
index 30fc51f..04e7836 100644
--- a/web/api/src/main/java/org/onlab/onos/rest/ConfigResource.java
+++ b/web/api/src/main/java/org/onlab/onos/rest/ConfigResource.java
@@ -55,7 +55,7 @@
             new ConfigProvider(cfg, get(DeviceProviderRegistry.class),
                                get(LinkProviderRegistry.class),
                                get(HostProviderRegistry.class)).parse();
-            return Response.ok(mapper.createObjectNode().toString()).build();
+            return Response.ok().build();
         } catch (Exception e) {
             log.error("Unable to parse topology configuration", e);
             return Response.status(INTERNAL_SERVER_ERROR).entity(e.toString()).build();
diff --git a/web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java b/web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java
index fdf6caa..7a6a791 100644
--- a/web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java
+++ b/web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java
@@ -300,11 +300,10 @@
                 .put("master", master(device.id()));
 
         // Generate labels: id, chassis id, no-label, optional-name
+        String name = device.annotations().value("name");
         ArrayNode labels = mapper.createArrayNode();
+        labels.add(isNullOrEmpty(name) ? device.id().toString() : name);
         labels.add(device.id().toString());
-        labels.add(device.chassisId().toString());
-        labels.add(""); // compact no-label view
-        labels.add(device.annotations().value("name"));
 
         // Add labels, props and stuff the payload into envelope.
         payload.set("labels", labels);
@@ -340,7 +339,7 @@
         String hostType = host.annotations().value("type");
         ObjectNode payload = mapper.createObjectNode()
                 .put("id", host.id().toString())
-                .put("type", isNullOrEmpty(hostType) ? "host" : hostType)
+                .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType)
                 .put("ingress", compactLinkString(edgeLink(host, true)))
                 .put("egress", compactLinkString(edgeLink(host, false)));
         payload.set("cp", hostConnect(mapper, host.location()));