diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-09 01:06:42 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-09 01:06:42 +0000 |
commit | cc5b0174949a4769876a892b210a9faa9683d81e (patch) | |
tree | 94ec47b1618161f1fd4d977b0d8ba1c322b99003 /ipalib/plugable.py | |
parent | 45201e31c1b7be7cb770d2e864c307c95e743751 (diff) | |
download | freeipa.git-cc5b0174949a4769876a892b210a9faa9683d81e.tar.gz freeipa.git-cc5b0174949a4769876a892b210a9faa9683d81e.tar.xz freeipa.git-cc5b0174949a4769876a892b210a9faa9683d81e.zip |
93: Added Proxy.implements() method; addeded corresponding unit tests
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index c5ceeffe..1e1f4a90 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -102,7 +102,7 @@ class Proxy(ReadOnly): Allows access to only certain attributes on its target object (a ProxyTarget). - Think of a proxy as an argreement that "I will have at most these + Think of a proxy as an agreement that "I will have at most these attributes". This is different from (although similar to) an interface, which can be thought of as an agreement that "I will have at least these attributes". @@ -136,9 +136,13 @@ class Proxy(ReadOnly): check_identifier(self.name) self.__lock__() + def implements(self, arg): + return self.__base.implements(arg) + def __iter__(self): """ - Iterates though the attribute names this proxy is allowing access to. + Iterates (in ascending order) though the attribute names this proxy is + allowing access to. """ for name in sorted(self.__public__): yield name @@ -176,6 +180,7 @@ class Proxy(ReadOnly): ) + class Plugin(object): """ Base class for all plugins. |