fix Delete
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Sat, 20 Oct 2012 00:32:10 +0000 (20:32 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Sat, 20 Oct 2012 00:32:10 +0000 (20:32 -0400)
sfa/client/sfi.py
sfa/methods/Delete.py
sfa/planetlab/pldriver.py

index e975939..004f439 100644 (file)
@@ -1183,7 +1183,7 @@ or with an slice hrn, shows currently provisioned resources
         api_options ['call_id'] = unique_call_id()
         if options.show_credential:
             show_credentials(creds)
-        result = server.Delete(slice_urn, creds, *self.ois(server, api_options ) )
+        result = server.Delete([slice_urn], creds, *self.ois(server, api_options ) )
         value = ReturnValue.get_value(result)
         if self.options.raw:
             save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner)
index 74ff838..8233fb7 100644 (file)
@@ -17,7 +17,7 @@ class Delete(Method):
     
     accepts = [
         Parameter(type([str]), "Human readable name of slice to delete (hrn or urn)"),
-        Parameter(dict, "Credentials"),
+        Parameter(type([dict]), "Credentials"),
         Parameter(dict, "options"),
         ]
 
index 65573a9..f00f1eb 100644 (file)
@@ -721,7 +721,7 @@ class PlDriver (Driver):
             node_ids = ids
         else:
             node_ids = slice['node_ids']
-     
+        slice_hrn = PlXrn(auth=self.hrn, slicename=slice['name']).get_hrn()     
         # determine if this is a peer slice
         # xxx I wonder if this would not need to use PlSlices.get_peer instead 
         # in which case plc.peers could be deprecated as this here