minor correction to CM side
[sfa.git] / sfa / managers / aggregate_manager_vini.py
index cba6957..b4d0984 100644 (file)
@@ -1,5 +1,5 @@
 from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
 from sfa.util.rspec import RSpec
 from sfa.server.registry import Registries
 from sfa.plc.nodes import *
@@ -13,7 +13,7 @@ SFA_VINI_WHITELIST = '/etc/sfa/vini.whitelist'
 Copied from create_slice_aggregate() in sfa.plc.slices
 """
 def create_slice_vini_aggregate(api, hrn, nodes):
-    # Get the slice record from geni
+    # Get the slice record
     slice = {}
     registries = Registries(api)
     registry = registries[api.hrn]
@@ -132,7 +132,8 @@ def create_slice_vini_aggregate(api, hrn, nodes):
 
     return 1
 
-def get_rspec(api, hrn):
+def get_rspec(api, xrn):
+    hrn = urn_to_hrn(xrn)[0]
     topo = Topology(api)      
     if (hrn):
         slicename = hrn_to_pl_slicename(hrn)
@@ -151,7 +152,8 @@ def get_rspec(api, hrn):
 """
 Hook called via 'sfi.py create'
 """
-def create_slice(api, hrn, xml):
+def create_slice(api, xrn, xml):
+    hrn = urn_to_hrn(xrn)[0]
     ### Check the whitelist
     ### It consists of lines of the form: <slice hrn> <bw>
     whitelist = {}