diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:11:33 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:11:33 -0600 |
commit | ddb5449c7faabbd4c1b71adfe84c386b943a163f (patch) | |
tree | 07a38af3cfbdd29d6df6adfae4169d9130c1086d /ipalib/__init__.py | |
parent | e37760a27358021962a6e6a8a7fbdc5195ce5bbe (diff) | |
download | freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.tar.gz freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.tar.xz freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.zip |
Did some initial work for Context plugins
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r-- | ipalib/__init__.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 4593e581d..a6664f73b 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -30,15 +30,18 @@ To learn about the ``ipalib`` library, you should read the code in this order: """ import plugable -import frontend -import backend -import config - -api = plugable.API( - frontend.Command, - frontend.Object, - frontend.Method, - frontend.Property, - frontend.Application, - backend.Backend, -) +from backend import Backend, Context +from frontend import Command, Object, Method, Property, Application +from ipa_types import Bool, Int, Unicode, Enum +from frontend import Param, DefaultFrom + +def get_standard_api(unit_test=False): + api = plugable.API( + Command, Object, Method, Property, Application, + Backend, Context, + ) + if unit_test is True: + api.env.mode = 'unit_test' + return api + +api = get_standard_api() |