diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-10-02 15:16:38 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-10-02 16:09:07 +0200 |
commit | 295ce7bf18510efbe7d170887eb4e6956d3db035 (patch) | |
tree | b1a2761d11f24aadde26ec605397e72124527b9b /ipalib/crud.py | |
parent | 1acd00487fad66983ec2716cb4ef888f8813d390 (diff) | |
download | freeipa-295ce7bf18510efbe7d170887eb4e6956d3db035.tar.gz freeipa-295ce7bf18510efbe7d170887eb4e6956d3db035.tar.xz freeipa-295ce7bf18510efbe7d170887eb4e6956d3db035.zip |
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.
Diffstat (limited to 'ipalib/crud.py')
-rw-r--r-- | ipalib/crud.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ipalib/crud.py b/ipalib/crud.py index d54b91fd7..72ea142da 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: |