diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-24 02:52:19 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-24 02:52:19 +0000 |
commit | 19bbc48eb601bb942ed93776c05bf0c326970832 (patch) | |
tree | 55594bbec7966f10ad12ff7ec01b837e6c184084 /ipalib/plugable.py | |
parent | 4dbbf5656d4db96068ca6c936120827e52ba5ad8 (diff) | |
download | freeipa-19bbc48eb601bb942ed93776c05bf0c326970832.tar.gz freeipa-19bbc48eb601bb942ed93776c05bf0c326970832.tar.xz freeipa-19bbc48eb601bb942ed93776c05bf0c326970832.zip |
323: Added Command.run() method that dispatches to execute() or forward(); added corresponding unit tests
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index f883eb12e..8bf90ea86 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -691,11 +691,15 @@ class API(DictProxy): Dynamic API object through which `Plugin` instances are accessed. """ __finalized = False - server_context = True - def __init__(self, *allowed): + def __init__(self, *allowed, **kw): self.__d = dict() self.register = Registrar(*allowed) + default = dict( + in_server_context=True, + ) + default.update(kw) + self.env = MagicDict(default) super(API, self).__init__(self.__d) def finalize(self): |