summaryrefslogtreecommitdiffstats
path: root/ipalib/crud.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/crud.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/crud.py')
-rw-r--r--ipalib/crud.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/crud.py b/ipalib/crud.py
index 4928c7f7d..eee32820d 100644
--- a/ipalib/crud.py
+++ b/ipalib/crud.py
@@ -56,9 +56,9 @@ Now we'll register the plugins and finalize the `plugable.API` instance:
>>> from ipalib import create_api
>>> api = create_api()
->>> api.register(user)
->>> api.register(user_add)
->>> api.register(user_show)
+>>> api.add_plugin(user)
+>>> api.add_plugin(user_add)
+>>> api.add_plugin(user_show)
>>> api.finalize()
First, notice that our ``user`` `Object` has the params we defined with the