Thomas Vachuska

Fixing visuals for the SDN-IP demo.

Change-Id: Idd518213062c49c4f9011b951d87d2020927608a
......@@ -13,14 +13,14 @@
],
"hosts" : [
{ "mac": "00:00:00:00:00:01", "vlan": -1, "location": "of:0000000000000001/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:00:02", "vlan": -1, "location": "of:0000000000000002/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:00:03", "vlan": -1, "location": "of:0000000000000003/10", "ip": "0.0.0.0", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:01:01", "vlan": -1, "location": "of:0000000000000005/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:01:02", "vlan": -1, "location": "of:0000000000000006/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:02:01", "vlan": -1, "location": "of:0000000000000007/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:03:01", "vlan": -1, "location": "of:0000000000000008/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:04:01", "vlan": -1, "location": "of:0000000000000009/10", "ip": "0.0.0.0", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:44:01", "vlan": -1, "location": "of:0000000000000010/10", "ip": "0.0.0.0", "annotations": { "type": "router" } }
{ "mac": "00:00:00:00:00:01", "vlan": -1, "location": "of:0000000000000001/10", "ip": "10.0.1.2, 10.0.2.2", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:00:02", "vlan": -1, "location": "of:0000000000000002/10", "ip": "10.0.11.2, 10.0.22.2, 10.0.3.2, 10.0.4.2", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:00:03", "vlan": -1, "location": "of:0000000000000003/10", "ip": "10.0.33.2, 10.0.44.2", "annotations": { "type": "bgpSpeaker" } },
{ "mac": "00:00:00:00:01:01", "vlan": -1, "location": "of:0000000000000005/10", "ip": "10.0.1.1", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:01:02", "vlan": -1, "location": "of:0000000000000006/10", "ip": "10.0.11.1", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:02:01", "vlan": -1, "location": "of:0000000000000007/10", "ip": "10.0.2.1, 10.0.22.1", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:03:01", "vlan": -1, "location": "of:0000000000000008/10", "ip": "10.0.3.1, 10.0.33.1", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:04:01", "vlan": -1, "location": "of:0000000000000009/10", "ip": "10.0.4.1", "annotations": { "type": "router" } },
{ "mac": "00:00:00:00:44:01", "vlan": -1, "location": "of:0000000000000010/10", "ip": "10.0.44.1", "annotations": { "type": "router" } }
]
}
\ No newline at end of file
......
......@@ -50,8 +50,10 @@ import org.onlab.packet.VlanId;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.onlab.onos.net.DeviceId.deviceId;
......@@ -205,10 +207,15 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider {
HostId hostId = HostId.hostId(mac, vlanId);
SparseAnnotations annotations = annotations(node.get("annotations"));
HostLocation location = new HostLocation(connectPoint(get(node, "location")), 0);
IpAddress ip = IpAddress.valueOf(get(node, "ip"));
String[] ipStrings = get(node, "ip").split(",");
Set<IpAddress> ips = new HashSet<>();
for (String ip : ipStrings) {
ips.add(IpAddress.valueOf(ip.trim()));
}
DefaultHostDescription desc =
new DefaultHostDescription(mac, vlanId, location, ip, annotations);
new DefaultHostDescription(mac, vlanId, location, ips, annotations);
hps.hostDetected(hostId, desc);
}
......
......@@ -77,7 +77,7 @@
<script type="text/javascript">
var ONOS = $.onos({
comment: 'configuration options',
theme: 'light',
theme: 'dark',
startVid: 'topo',
trace: false
});
......
......@@ -85,11 +85,13 @@
background-color: #bbb;
border: 1px solid #eee;
color: #666;
}
.dark #mast span.radio.active {
background-color: #222;
border: 1px solid #eee;
color: #aaf;
Xcolor: #aaf;
color: #78a;
}
/* Button Bar */
......@@ -119,6 +121,7 @@
border-bottom-color: #fff;
background-color: #888;
color: #ddf;
font-weight: bold;
}
.dark #bb .btn {
......@@ -133,6 +136,8 @@
border-right-color: #888;
border-bottom-color: #888;
background-color: #555;
color: #bbd;
Xcolor: #bbd;
color: #78a;
font-weight: bold;
}
......
......@@ -38,7 +38,7 @@
var defaultOptions = {
trace: false,
theme: 'light',
theme: 'dark',
startVid: defaultVid
};
......
......@@ -44,6 +44,7 @@
#topo svg .node.selected rect,
#topo svg .node.selected circle {
fill: #ffA300;
filter: url(#blue-glow);
}
......@@ -81,7 +82,7 @@
}
#topo svg .node.device.roadm.online {
fill: #03c;
fill: #335a9a;
}
/* note: device is offline without the 'online' class */
......
......@@ -77,10 +77,10 @@
linkOutWidth: 30
},
icons: {
w: 24,
h: 24,
xoff: -10,
yoff: -6
w: 30,
h: 30,
xoff: -16,
yoff: -14
},
iconUrl: {
device: 'img/device.png',
......