summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xipa2
-rw-r--r--ipalib/__init__.py10
-rw-r--r--ipalib/api.py27
-rw-r--r--ipalib/plugins/example.py2
4 files changed, 12 insertions, 29 deletions
diff --git a/ipa b/ipa
index 5f532962f..2f4fdf70b 100755
--- a/ipa
+++ b/ipa
@@ -26,7 +26,7 @@ Just proof of concept stuff in here right now.
"""
import sys
-from ipalib.api import api
+from ipalib import api
from ipalib.cli import CLI
import ipalib.load_plugins
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index 4d96c2d61..2436d9b14 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 f6820fd9e..000000000
--- 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 f7a5fe70a..4f9605649 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):