Merge Master in geni-v3 conflict resolution
[sfa.git] / sfa / federica / fddriver.py
index 1e16d7f..96c7aa4 100644 (file)
@@ -2,7 +2,7 @@ from sfa.util.sfalogging import logger
 from sfa.util.faults import SfaFault
 
 # this is probably too big to swallow but for a starting point..
-from sfa.plc.pldriver import PlDriver
+from sfa.planetlab.pldriver import PlDriver
 
 from sfa.federica.fdshell import FdShell
 
@@ -54,7 +54,11 @@ class FdDriver (PlDriver):
         return "federica"
 
     def list_slices (self, creds, options):
-        return self.response(self.shell.listSlices())
+        # the issue is that federica returns the list of slice's urn in a string format
+        # this is why this dirty hack is needed until federica fixes it. 
+        slices_str = self.shell.listSlices()['value'][1:-1]
+        slices_list = slices_str.split(", ")
+        return slices_list
 
     def sliver_status (self, slice_urn, slice_hrn):
         return "fddriver.sliver_status: undefined/todo for slice %s"%slice_hrn