summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/__init__.py10
-rw-r--r--ipalib/api.py27
-rw-r--r--ipalib/plugins/example.py2
3 files changed, 11 insertions, 28 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index 4d96c2d6..2436d9b1 100644
--- a/ipalib/__init__.py
+++ b/ipalib/__init__.py
@@ -31,3 +31,13 @@ To learn about the ``ipalib`` library, you should read the code in this order:
Some of the plugin architecture was inspired by ``bzr``, so you might also
read http://bazaar-vcs.org/WritingPlugins
"""
+
+import plugable
+import public
+
+api = plugable.API(
+ public.Command,
+ public.Object,
+ public.Method,
+ public.Property,
+)
diff --git a/ipalib/api.py b/ipalib/api.py
deleted file mode 100644
index f6820fd9..00000000
--- a/ipalib/api.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Authors:
-# Jason Gerard DeRose <jderose@redhat.com>
-#
-# Copyright (C) 2008 Red Hat
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2 only
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-"""
-Standard instances of plugable.API and its subclasses.
-"""
-
-import public
-
-# The standard API instance
-api = public.PublicAPI()
diff --git a/ipalib/plugins/example.py b/ipalib/plugins/example.py
index f7a5fe70..4f960564 100644
--- a/ipalib/plugins/example.py
+++ b/ipalib/plugins/example.py
@@ -23,7 +23,7 @@ Some example plugins.
from ipalib import public
-from ipalib.api import api
+from ipalib import api
# Hypothetical functional commands (not associated with any object):