summaryrefslogtreecommitdiffstats
path: root/ipalib/crud.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-06-10 14:20:54 +0200
committerRob Crittenden <rcritten@redhat.com>2009-06-10 11:53:20 -0400
commit8edaff5266895ebdf58036c22467127519ad5288 (patch)
tree915795b1c1198a059e0cf16d09cbde76ebd157b4 /ipalib/crud.py
parentdc23be68784a1ae3d5c88cc4861142c9efa5394e (diff)
downloadfreeipa-8edaff5266895ebdf58036c22467127519ad5288.tar.gz
freeipa-8edaff5266895ebdf58036c22467127519ad5288.tar.xz
freeipa-8edaff5266895ebdf58036c22467127519ad5288.zip
Generate crud.Search arguments with get_args.
Diffstat (limited to 'ipalib/crud.py')
-rw-r--r--ipalib/crud.py8
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)
+