from sfa.util.sfalogging import logger
from sfa.util.defaultdict import defaultdict
from sfa.util.sfatime import utcparse, datetime_to_string, datetime_to_epoch
-from sfa.util.xrn import hrn_to_urn, get_leaf, urn_to_sliver_id
+from sfa.util.xrn import hrn_to_urn, get_leaf
from sfa.util.cache import Cache
# one would think the driver should not need to mess with the SFA db, but..
def describe(self, creds, urns, options):
return {}
- def sliver_status (self, slice_urn, slice_hrn):
+ def status (self, slice_urn, slice_hrn):
# find out where this slice is currently running
slicename = hrn_to_pl_slicename(slice_hrn)
if node['last_contact'] is not None:
res['pl_last_contact'] = datetime_to_string(utcparse(node['last_contact']))
- sliver_id = urn_to_sliver_id(slice_urn, slice['slice_id'], node['node_id'], authority=self.hrn)
- res['geni_urn'] = sliver_id
+ sliver_id = "%s:%s" % (slice['slice_id'], node['node_id'])
+ sliver_xrn = Xrn(slice_urn, id = sliver_id)
+ sliver_xrn.set_authority(self.hrn)
+ res['geni_urn'] = sliver_xrn.get_urn()
if node['boot_state'] == 'boot':
res['geni_status'] = 'ready'
else: