From dad82c5ff6fdcbd6c588d3a0fad2d2a6ac972af8 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 16 Jan 2007 22:57:32 +0000 Subject: [PATCH] - fix returns documentation --- PLC/Methods/SliceListNames.py | 2 +- PLC/Methods/SliceListUserSlices.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/PLC/Methods/SliceListNames.py b/PLC/Methods/SliceListNames.py index b046e9c..bf5b4a2 100644 --- a/PLC/Methods/SliceListNames.py +++ b/PLC/Methods/SliceListNames.py @@ -24,7 +24,7 @@ class SliceListNames(GetSlices): Parameter(str, "Slice prefix", nullok = True) ] - returns = [Slice.fields] + returns = [Slice.fields['name']] def call(self, auth, prefix=None): diff --git a/PLC/Methods/SliceListUserSlices.py b/PLC/Methods/SliceListUserSlices.py index 580e97b..43aface 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] -- 2.43.0