Committed by
Gerrit Code Review
Various gui & test script tweaks.
Change-Id: I62d8c560d4d533cd6d38ee9388a2a2e0400f51a2
Showing
8 changed files
with
55 additions
and
8 deletions
tools/test/bin/onos-local
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | +# ----------------------------------------------------------------------------- | ||
| 3 | +# ONOS local karaf server start. | ||
| 4 | +# ----------------------------------------------------------------------------- | ||
| 5 | + | ||
| 6 | +unset KARAF_HOME | ||
| 7 | +karaf "$@" | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | # Thomas' VirtualBox-based single ONOS instance & ONOS mininet box | 1 | # Thomas' VirtualBox-based single ONOS instance & ONOS mininet box |
| 2 | 2 | ||
| 3 | export ONOS_NIC=192.168.56.* | 3 | export ONOS_NIC=192.168.56.* |
| 4 | -export OC1="192.168.56.101" | 4 | +export OC1="192.168.56.11" |
| 5 | -export OCN="192.168.56.103" | 5 | +export OCN="192.168.56.7" |
| 6 | export OCI="${OC1}" | 6 | export OCI="${OC1}" |
| 7 | 7 | ||
| 8 | -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 | 8 | +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 | ... | ... |
tools/test/cells/tom3
0 → 100644
| 1 | +# Thomas' VirtualBox-based 3 ONOS instances & ONOS mininet box | ||
| 2 | + | ||
| 3 | +export ONOS_NIC=192.168.56.* | ||
| 4 | +export OC1="192.168.56.11" | ||
| 5 | +export OC2="192.168.56.12" | ||
| 6 | +export OC3="192.168.56.13" | ||
| 7 | +export OCN="192.168.56.7" | ||
| 8 | +export OCI="${OC1}" | ||
| 9 | + | ||
| 10 | +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 |
tools/test/topos/att-onos.py
0 → 100644
| 1 | +#!/usr/bin/python | ||
| 2 | + | ||
| 3 | +import sys | ||
| 4 | + | ||
| 5 | +from mininet.net import Mininet | ||
| 6 | +from mininet.cli import CLI | ||
| 7 | +from mininet.log import setLogLevel | ||
| 8 | +from mininet.node import RemoteController | ||
| 9 | +from mininet.link import TCLink | ||
| 10 | + | ||
| 11 | +from attmpls import AttMplsTopo | ||
| 12 | + | ||
| 13 | +setLogLevel( 'info' ) | ||
| 14 | + | ||
| 15 | +def run(controllers=[ '127.0.0.1' ]): | ||
| 16 | + net = Mininet( topo=AttMplsTopo(), link=TCLink, build=False, autoSetMacs=True ) | ||
| 17 | + ctrl_count = 0 | ||
| 18 | + for controllerIP in controllers: | ||
| 19 | + net.addController( 'c%d' % ctrl_count, RemoteController, ip=controllerIP ) | ||
| 20 | + net.build() | ||
| 21 | + net.start() | ||
| 22 | + CLI( net ) | ||
| 23 | + net.stop() | ||
| 24 | + | ||
| 25 | +if __name__ == '__main__': | ||
| 26 | + if len( sys.argv ) > 1: | ||
| 27 | + controllers = sys.argv[ 1: ] | ||
| 28 | + else: | ||
| 29 | + print 'Usage: att-onos.py <c0 IP> <c1 IP> ...' | ||
| 30 | + exit( 1 ) | ||
| 31 | + run( controllers ) |
| ... | @@ -55,7 +55,7 @@ public class ConfigResource extends BaseResource { | ... | @@ -55,7 +55,7 @@ public class ConfigResource extends BaseResource { |
| 55 | new ConfigProvider(cfg, get(DeviceProviderRegistry.class), | 55 | new ConfigProvider(cfg, get(DeviceProviderRegistry.class), |
| 56 | get(LinkProviderRegistry.class), | 56 | get(LinkProviderRegistry.class), |
| 57 | get(HostProviderRegistry.class)).parse(); | 57 | get(HostProviderRegistry.class)).parse(); |
| 58 | - return Response.ok(mapper.createObjectNode().toString()).build(); | 58 | + return Response.ok().build(); |
| 59 | } catch (Exception e) { | 59 | } catch (Exception e) { |
| 60 | log.error("Unable to parse topology configuration", e); | 60 | log.error("Unable to parse topology configuration", e); |
| 61 | return Response.status(INTERNAL_SERVER_ERROR).entity(e.toString()).build(); | 61 | return Response.status(INTERNAL_SERVER_ERROR).entity(e.toString()).build(); | ... | ... |
| ... | @@ -300,11 +300,10 @@ public abstract class TopologyViewMessages { | ... | @@ -300,11 +300,10 @@ public abstract class TopologyViewMessages { |
| 300 | .put("master", master(device.id())); | 300 | .put("master", master(device.id())); |
| 301 | 301 | ||
| 302 | // Generate labels: id, chassis id, no-label, optional-name | 302 | // Generate labels: id, chassis id, no-label, optional-name |
| 303 | + String name = device.annotations().value("name"); | ||
| 303 | ArrayNode labels = mapper.createArrayNode(); | 304 | ArrayNode labels = mapper.createArrayNode(); |
| 305 | + labels.add(isNullOrEmpty(name) ? device.id().toString() : name); | ||
| 304 | labels.add(device.id().toString()); | 306 | labels.add(device.id().toString()); |
| 305 | - labels.add(device.chassisId().toString()); | ||
| 306 | - labels.add(""); // compact no-label view | ||
| 307 | - labels.add(device.annotations().value("name")); | ||
| 308 | 307 | ||
| 309 | // Add labels, props and stuff the payload into envelope. | 308 | // Add labels, props and stuff the payload into envelope. |
| 310 | payload.set("labels", labels); | 309 | payload.set("labels", labels); |
| ... | @@ -340,7 +339,7 @@ public abstract class TopologyViewMessages { | ... | @@ -340,7 +339,7 @@ public abstract class TopologyViewMessages { |
| 340 | String hostType = host.annotations().value("type"); | 339 | String hostType = host.annotations().value("type"); |
| 341 | ObjectNode payload = mapper.createObjectNode() | 340 | ObjectNode payload = mapper.createObjectNode() |
| 342 | .put("id", host.id().toString()) | 341 | .put("id", host.id().toString()) |
| 343 | - .put("type", isNullOrEmpty(hostType) ? "host" : hostType) | 342 | + .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType) |
| 344 | .put("ingress", compactLinkString(edgeLink(host, true))) | 343 | .put("ingress", compactLinkString(edgeLink(host, true))) |
| 345 | .put("egress", compactLinkString(edgeLink(host, false))); | 344 | .put("egress", compactLinkString(edgeLink(host, false))); |
| 346 | payload.set("cp", hostConnect(mapper, host.location())); | 345 | payload.set("cp", hostConnect(mapper, host.location())); | ... | ... |
-
Please register or login to post a comment