fixes transcoding issue for nodes - local nodes were transcoded to None
[plcapi.git] / PLC / Methods / SliceCreate.py
index 11a700c..668f46d 100644 (file)
@@ -1,7 +1,7 @@
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 from PLC.Slices import Slice, Slices
 from PLC.Methods.AddSlice import AddSlice
 
@@ -13,11 +13,15 @@ class SliceCreate(AddSlice):
     status = "deprecated"
     
     accepts = [
-        PasswordAuth(),
+        Auth(),
         Slice.fields['name'],
         AddSlice.accepts[1]
         ]
+    
+    returns = Parameter(int, 'New slice_id (> 0) if successful')
 
+    object_type = 'Slice'
+    
     def call(self, auth, name, slice_fields = {}):
         slice_fields['name'] = name
         return AddSlice.call(self, auth, slice_fields)