X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FSliceListUserSlices.py;h=43aface41fb33deaf013a3e0999c254fc756fb04;hb=dad82c5ff6fdcbd6c588d3a0fad2d2a6ac972af8;hp=580e97b27fde266400c4081c51949a234af6c356;hpb=e499729c53c1bbfcfe3ec46043477f1e28c04119;p=plcapi.git diff --git a/PLC/Methods/SliceListUserSlices.py b/PLC/Methods/SliceListUserSlices.py index 580e97b2..43aface4 100644 --- a/PLC/Methods/SliceListUserSlices.py +++ b/PLC/Methods/SliceListUserSlices.py @@ -5,10 +5,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. @@ -22,15 +23,15 @@ class SliceListUserSlices(GetSlices): 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(self, auth, [email]) if not persons: return [] person = persons[0]