From: Sandrine Avakian Date: Mon, 23 Jul 2012 13:51:19 +0000 (+0200) Subject: Fixed bug in list_slices. Slices'urn was not correct X-Git-Tag: sfa-2.1-24~3^2~112 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=80890b2fcde3f07b823f39d9f4727d2dba6fe7a7;p=sfa.git Fixed bug in list_slices. Slices'urn was not correct because of the use of slicename_to_hrn from plaetlab,plxrn. --- diff --git a/sfa/senslab/slabdriver.py b/sfa/senslab/slabdriver.py index 84e2a7e4..e33f12ca 100644 --- a/sfa/senslab/slabdriver.py +++ b/sfa/senslab/slabdriver.py @@ -18,9 +18,7 @@ from sfa.rspecs.version_manager import VersionManager from sfa.rspecs.rspec import RSpec from sfa.util.xrn import hrn_to_urn, urn_to_sliver_id, get_leaf -from sfa.planetlab.plxrn import slicename_to_hrn, \ - hostname_to_urn, \ - xrn_to_hostname +from sfa.planetlab.plxrn import hostname_to_urn, xrn_to_hostname ## thierry: everything that is API-related (i.e. handling incoming requests) # is taken care of @@ -291,12 +289,13 @@ class SlabDriver(Driver): # get data from db slices = self.GetSlices() - logger.debug("SLABDRIVER.PY \tlist_slices %s" %(slices)) - slice_hrns = [slicename_to_hrn(self.hrn, slab_slice['slice_hrn']) \ - for slab_slice in slices] + logger.debug("SLABDRIVER.PY \tlist_slices hrn %s \r\n \r\n" %(slices)) + slice_hrns = [slab_slice['slice_hrn'] for slab_slice in slices] + #slice_hrns = [slicename_to_hrn(self.hrn, slab_slice['slice_hrn']) \ + #for slab_slice in slices] slice_urns = [hrn_to_urn(slice_hrn, 'slice') \ for slice_hrn in slice_hrns] - + # cache the result #if self.cache: #logger.debug ("SlabDriver.list_slices stores value in cache")