Commit 6b226688 authored by David Johnson's avatar David Johnson

Synch up with Ammon topology changes and enable commented subedge links.

parent cd40c5df
Pipeline #3056 passed with stages
in 15 seconds
......@@ -104,10 +104,10 @@ class IPv6Address(RSpec.Address):
CMD = "sudo mkdir -p /root/setup && sudo -H /local/repository/tests/cloudlab-profile/setup.sh 2>&1 | sudo tee /root/setup/setup.log"
nodemap = {
'2':1,'7':1,'8':1,'10':1,'cb':1,'10se':1,#'7se':1,
'2':1,'7':1,'8':1,'10':1,'cb':1,'7se':1,'10se':1,
'sdx':2,'5':2,'9':2,'11':2,'12':2,'co':2,'11se':2 }
mgmtmap = {
'2':2,'7':7,'8':8,'10':10,'cb':16,'10se':18,#'7se':252,
'2':2,'7':7,'8':8,'10':10,'cb':16,'7se':17,'10se':18,
'sdx':20,'5':5,'9':9,'11':11,'12':12,'co':15,'11se':19 }
mgmtprefix = "10.60.0"
......@@ -119,7 +119,8 @@ bits6 = 126
addrs = {
"node-2-cb":0x1,"node-2-7":0x5,"node-2-10":0x9,"node-2-8":0xd,
"node-5-9":0x11,"node-5-11":0x15,"node-5-12":0x19,"node-5-sdx":0x4a,
"node-7-2":0x6,"node-7-cb":0x1d,"node-7-10":0x21,
"node-5-cb-1":0x58,"node-5-cb-2":0x5c,
"node-7-2":0x6,"node-7-cb":0x1d,"node-7-10":0x21,"node-7-7se":0x54,
"node-8-2":0xe,"node-8-cb":0x25,"node-8-10":0x29,
"node-9-12":0x31,"node-9-11":0x2d,"node-9-5":0x12,"node-9-co":0x35,
"node-10-8":0x2a,"node-10-7":0x22,"node-10-2":0xa,"node-10-10se":0x50,
......@@ -127,6 +128,8 @@ addrs = {
"node-12-9":0x32,"node-12-5":0x1a,"node-12-co":0x3d,
"node-co-11":0x3a,"node-co-9":0x36,"node-co-12":0x3e,
"node-cb-2":0x2,"node-cb-8":0x26,"node-cb-7":0x1e,"node-cb-sdx":0x46,
"node-cb-5-1":0x59,"node-cb-5-2":0x5d,
"node-7se-7":0x55,
"node-10se-10":0x51,
"node-11se-11":0x4d,
"node-sdx-cb":0x45,"node-sdx-5":0x49,
......@@ -206,7 +209,14 @@ if params.bestEffort:
mgmtlan.best_effort = True
for (k,v) in addrs.iteritems():
(src,dst) = tuple(k.split('-')[1:])
sa = k.split('-')[1:]
(src,dst) = (sa[0],sa[1])
if len(sa) > 2:
linkidx = int(sa[2])
postfix = "-" + sa[2]
else:
linkidx = None
postfix = ""
srcname = 'node-' + src
dstname = 'node-' + dst
for (name,num) in [(srcname,src),(dstname,dst)]:
......@@ -234,8 +244,8 @@ for (k,v) in addrs.iteritems():
iface.addAddress(
IPv4Address("%s.%s" % (mgmtprefix,mgmtmap[num]),prefixlen=mgmtbits))
mgmtlan.addInterface(iface)
linkname = "link-%s-%s" % (src,dst)
revlinkname = "link-%s-%s" % (dst,src)
linkname = "link-%s-%s%s" % (src,dst,postfix)
revlinkname = "link-%s-%s%s" % (dst,src,postfix)
if not linkname in links and not revlinkname in links:
links[linkname] = link = RSpec.Link(linkname)
if params.linkSpeed > 0:
......@@ -248,15 +258,15 @@ for (k,v) in addrs.iteritems():
if params.bestEffort:
link.best_effort = True
iface = nodes[srcname].addInterface("if%s" % (dst))
sdnum = addrs["node-%s-%s" % (src,dst)]
iface = nodes[srcname].addInterface("if%s%s" % (dst,postfix))
sdnum = addrs["node-%s-%s%s" % (src,dst,postfix)]
iface.addAddress(
IPv4Address("%s.%s" % (prefix4,str(sdnum)),prefixlen=bits4))
iface.addAddress(
IPv6Address("%s::%s" % (prefix6,hex(sdnum)[2:]),prefixlen=bits6))
link.addInterface(iface)
iface = nodes[dstname].addInterface("if%s" % (src))
dsnum = addrs["node-%s-%s" % (dst,src)]
iface = nodes[dstname].addInterface("if%s%s" % (src,postfix))
dsnum = addrs["node-%s-%s%s" % (dst,src,postfix)]
iface.addAddress(
IPv4Address("%s.%s" % (prefix4,str(dsnum)),prefixlen=bits4))
iface.addAddress(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment