From 15a4c0d2767c0a37d55463d4bba60442a83539bb Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 25 Apr 2016 16:14:05 +0200 Subject: 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 --- ipalib/crud.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib/crud.py') 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 -- cgit