From 8edaff5266895ebdf58036c22467127519ad5288 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Wed, 10 Jun 2009 14:20:54 +0200 Subject: Generate crud.Search arguments with get_args. --- ipalib/crud.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipalib') 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) + -- cgit