dirty hack to fix federica list_slices: the issue is that federica returns the list...
authorMohamed Larabi <aminelarabi@vis074b.sophia.inria.fr>
Tue, 19 Feb 2013 17:11:31 +0000 (18:11 +0100)
committerMohamed Larabi <aminelarabi@vis074b.sophia.inria.fr>
Tue, 19 Feb 2013 17:11:31 +0000 (18:11 +0100)
sfa/federica/fddriver.py

index 3b94756..368c3dc 100644 (file)
@@ -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:-2]
+        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