diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-25 23:35:29 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-25 23:35:29 +0000 |
commit | 2fc3819beca86c3d19d85e2f5777af3566305175 (patch) | |
tree | b989c83e1de6047e54240ce14101fe2be8c47136 | |
parent | 513bbb32b989906795d281738d90fc113192b217 (diff) | |
download | freeipa-2fc3819beca86c3d19d85e2f5777af3566305175.tar.gz freeipa-2fc3819beca86c3d19d85e2f5777af3566305175.tar.xz freeipa-2fc3819beca86c3d19d85e2f5777af3566305175.zip |
191: Removed ipalib/api.py module; standard plugable.API instance is now in ipalib.__init__.py
-rwxr-xr-x | ipa | 2 | ||||
-rw-r--r-- | ipalib/__init__.py | 10 | ||||
-rw-r--r-- | ipalib/api.py | 27 | ||||
-rw-r--r-- | ipalib/plugins/example.py | 2 |
4 files changed, 12 insertions, 29 deletions
@@ -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): |