Thomas Vachuska
Committed by Gerrit Code Review

Various gui & test script tweaks.

Change-Id: I62d8c560d4d533cd6d38ee9388a2a2e0400f51a2
#!/bin/bash
# -----------------------------------------------------------------------------
# ONOS local karaf server start.
# -----------------------------------------------------------------------------
unset KARAF_HOME
karaf "$@"
\ No newline at end of file
# 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
......
# 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
#!/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 )
......@@ -55,7 +55,7 @@ public class ConfigResource extends BaseResource {
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();
......
......@@ -300,11 +300,10 @@ public abstract class TopologyViewMessages {
.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 @@ public abstract class TopologyViewMessages {
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()));
......