removed another bunch of references to geni
[sfa.git] / sfa / rspecs / aggregates / vini / utils.py
index b5bfa5c..ea36aad 100644 (file)
@@ -494,7 +494,7 @@ class Topology:
         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):
@@ -542,7 +542,7 @@ class Topology:
         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))
@@ -560,12 +560,12 @@ class Topology:
     """
     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 += """