#!/usr/bin/python
from collections import defaultdict
-from sfa.util.xrn import Xrn, hrn_to_urn, urn_to_hrn
+from sfa.util.xrn import Xrn, hrn_to_urn, urn_to_hrn, get_authority, get_leaf
from sfa.util.sfatime import utcparse, datetime_to_string
from sfa.util.sfalogging import logger
from sfa.util.faults import SliverDoesNotExist
from sfa.rspecs.elements.granularity import Granularity
from sfa.rspecs.version_manager import VersionManager
-from sfa.planetlab.plxrn import PlXrn, hostname_to_urn, hrn_to_pl_slicename, slicename_to_hrn
+from sfa.planetlab.plxrn import PlXrn, hostname_to_urn, hrn_to_pl_slicename, slicename_to_hrn, xrn_to_ext_slicename, top_auth
from sfa.planetlab.vlink import get_tc_rate
from sfa.planetlab.topology import Topology
from sfa.storage.alchemy import dbsession
pass
else:
slice_hrn = xrn.get_hrn()
- site_hrn = get_authority(slice_hrn)
- top_auth_hrn = site_hrn.split('.')[0]
+ top_auth_hrn = top_auth(slice_hrn)
if top_auth_hrn == self.driver.hrn:
slice_name = hrn_to_pl_slicename(slice_hrn)
else:
- login_base = '8'.join(site_hrn.split('.'))
- slice_name = '_'.join([login_base, get_leaf(slice_hrn)])
-
+ slice_name = xrn_to_ext_slicename(slice_hrn)
names.add(slice_name)
filter = {}