for l in linkspecs:
n1 = nodedict[l['endpoint'][0]]
n2 = nodedict[l['endpoint'][1]]
- bps = l['kbps'][0] * 1000
+ bps = int(l['kbps'][0]) * 1000
self.nodelinks.append(Link(n1, n2, bps))
def nodeTopoFromSliceTags(self, slice):
maxbps = get_tc_rate(maxbw)
for link in self.nodelinks:
if link.bps <= 0:
- raise GeniInvalidArgument(bw, "BW")
+ raise SfaInvalidArgument(bw, "BW")
if link.bps > maxbps:
raise PermissionError(" %s requested %s but max BW is %s" %
(hrn, format_tc_rate(link.bps), maxbw))
"""
def toxml(self, hrn = None):
xml = """<?xml version="1.0"?>
-<RSpec xmlns="http://www.planet-lab.org/sfa/rspec/" name="vini">
+<RSpec name="vini">
<Capacity>
<NetSpec name="physical_topology">"""
for site in self.getSites():
- if not (site.public and site.enabled):
+ if not (site.public and site.enabled and site.node_ids):
continue
xml += """