svn keywords
[plcapi.git] / PLC / Methods / SliceListUserSlices.py
index 580e97b..91936c2 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.Filter import Filter
@@ -5,10 +7,11 @@ from PLC.Auth import Auth
 from PLC.Slices import Slice, Slices
 from PLC.Persons import Person, Persons
 from PLC.Methods.GetSlices import GetSlices
+from PLC.Methods.GetPersons import GetPersons
 
-class SliceListUserSlices(GetSlices):
+class SliceListUserSlices(GetSlices, GetPersons):
     """
-    Deprecated. Can be implemented with GetPersons.
+    Deprecated. Can be implemented with GetPersons and GetSlices.
 
     Return the slices the specified user (by email address) is a member of.
 
@@ -18,19 +21,21 @@ class SliceListUserSlices(GetSlices):
     slice_filter, details about that slice will not be returned.
     """
 
+    status = "deprecated"
+
     roles = ['admin', 'pi', 'user']
 
     accepts = [
         Auth(),
-        Parameter(str, "Slice prefix", nullok = True)
+        Person.fields['email']
         ]
 
-    returns = [Slice.fields]
+    returns = [Slice.fields['name']]
     
 
     def call(self, auth, email):
 
-       persons = Persons(self.api, [email])
+       persons = GetPersons.call(self, auth, [email])
        if not persons:
                return []
        person = persons[0]