From 295ce7bf18510efbe7d170887eb4e6956d3db035 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 2 Oct 2013 15:16:38 +0200 Subject: Use correct super-calls in get_args() methods The get_args methods in ipalib.crud and ipalib.plugins.baseldap used super() calls that skipped some of the classes in the inheritance chain, and contained code that reimplemented some of the skipped functionality. This made it difficult to customize the get_args behavior. Use proper super() calls. --- ipalib/crud.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ipalib/crud.py') diff --git a/ipalib/crud.py b/ipalib/crud.py index d54b91fd..72ea142d 100644 --- a/ipalib/crud.py +++ b/ipalib/crud.py @@ -120,7 +120,10 @@ Note that the above are all equal. """ from frontend import Method, Object -import backend, frontend, parameters, output +import backend +import parameters +import output +from ipalib.text import _ class Create(Method): @@ -133,6 +136,8 @@ class Create(Method): def get_args(self): if self.obj.primary_key: yield self.obj.primary_key.clone(attribute=True) + for arg in super(Create, self).get_args(): + yield arg def get_options(self): if self.extra_options_first: @@ -164,6 +169,8 @@ class PKQuery(Method): # Don't enforce rules on the primary key so we can reference # any stored entry, legal or not yield self.obj.primary_key.clone(attribute=True, query=True) + for arg in super(PKQuery, self).get_args(): + yield arg class Retrieve(PKQuery): @@ -230,7 +237,11 @@ class Search(Method): has_output = output.standard_list_of_entries def get_args(self): - yield parameters.Str('criteria?', noextrawhitespace=False) + yield parameters.Str( + 'criteria?', noextrawhitespace=False, + doc=_('A string searched in all relevant object attributes')) + for arg in super(Search, self).get_args(): + yield arg def get_options(self): if self.extra_options_first: -- cgit