summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-04-25 16:14:05 +0200
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit15a4c0d2767c0a37d55463d4bba60442a83539bb (patch)
tree8de3382c3af1ae8bbfa419e81abad3b60294afde /ipalib/frontend.py
parentbed546ee8220992084520737320a646dc47ec1e3 (diff)
downloadfreeipa-15a4c0d2767c0a37d55463d4bba60442a83539bb.tar.gz
freeipa-15a4c0d2767c0a37d55463d4bba60442a83539bb.tar.xz
freeipa-15a4c0d2767c0a37d55463d4bba60442a83539bb.zip
ipalib, ipaserver: fix incorrect API.register calls in docstrings
Use API.add_plugin to load specific plugins into API objects. Use Registry to register plugins. This fixes doctests. https://fedorahosted.org/freeipa/ticket/4739 https://fedorahosted.org/freeipa/ticket/5115 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index adad3707d..d9bf3d6c7 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -384,7 +384,7 @@ class Command(HasParam):
>>> class my_command(Command):
... pass
...
- >>> api.register(my_command)
+ >>> api.add_plugin(my_command)
>>> api.finalize()
>>> list(api.Command)
['my_command']
@@ -1336,8 +1336,8 @@ class Method(Attribute, Command):
>>> class user(Object):
... pass
...
- >>> api.register(user_add)
- >>> api.register(user)
+ >>> api.add_plugin(user_add)
+ >>> api.add_plugin(user)
>>> api.finalize()
First, the ``user_add`` plugin can be accessed through the ``api.Method``
@@ -1404,11 +1404,11 @@ class Updater(Plugin):
>>> class my(Object):
... pass
...
- >>> api.register(my)
+ >>> api.add_plugin(my)
>>> class my_update(Updater):
... pass
...
- >>> api.register(my_update)
+ >>> api.add_plugin(my_update)
>>> api.finalize()
>>> list(api.Updater)
['my_update']