diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-06-10 14:20:54 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-06-10 11:53:20 -0400 |
commit | 8edaff5266895ebdf58036c22467127519ad5288 (patch) | |
tree | 915795b1c1198a059e0cf16d09cbde76ebd157b4 /ipalib | |
parent | dc23be68784a1ae3d5c88cc4861142c9efa5394e (diff) | |
download | freeipa-8edaff5266895ebdf58036c22467127519ad5288.tar.gz freeipa-8edaff5266895ebdf58036c22467127519ad5288.tar.xz freeipa-8edaff5266895ebdf58036c22467127519ad5288.zip |
Generate crud.Search arguments with get_args.
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/crud.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/crud.py b/ipalib/crud.py index e19382e91..8b24d1f8f 100644 --- a/ipalib/crud.py +++ b/ipalib/crud.py @@ -16,12 +16,11 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - """ Base classes for standard CRUD operations. """ -import backend, frontend +import backend, frontend, parameters class Add(frontend.Method): def get_args(self): @@ -122,7 +121,6 @@ class Update(PKQuery): for option in super(Update, self).get_options(): yield option - class Delete(PKQuery): """ Delete one or more entries. @@ -134,7 +132,8 @@ class Search(frontend.Method): Retrieve all entries that match a given search criteria. """ - takes_args = 'criteria?' + def get_args(self): + yield parameters.Str('criteria?') def get_options(self): if self.extra_options_first: @@ -223,3 +222,4 @@ class CrudBackend(backend.Connectible): this method should return an empty iterable. """ raise NotImplementedError('%s.search()' % self.name) + |