diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-02-18 00:02:51 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-02-18 10:10:35 -0500 |
commit | e245b6da9bc87c23df64edcc240d49358f558ef7 (patch) | |
tree | 073fcd721a78d92ea95c60fc0a91dbbcc60bd842 /ipalib/plugins/baseldap.py | |
parent | fa75959486ddbd0be00f3611457e940215635a3a (diff) | |
download | freeipa-e245b6da9bc87c23df64edcc240d49358f558ef7.tar.gz freeipa-e245b6da9bc87c23df64edcc240d49358f558ef7.tar.xz freeipa-e245b6da9bc87c23df64edcc240d49358f558ef7.zip |
Updated json_metadata and i18n_messages.
The json_metadata() has been updated to return ipa.Objects and
ipa.Methods. The i18n_messages() has been updated to include other
messages that are not available from the metadata.
Diffstat (limited to 'ipalib/plugins/baseldap.py')
-rw-r--r-- | ipalib/plugins/baseldap.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 2d25219da..2e284274b 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -620,6 +620,16 @@ class LDAPCreate(CallbackInterface, crud.Create): def exc_callback(self, keys, options, exc, call_func, *call_args, **call_kwargs): raise exc + # list of attributes we want exported to JSON + json_friendly_attributes = ( + 'takes_options', + ) + + def __json__(self): + json_dict = dict( + (a, getattr(self, a)) for a in self.json_friendly_attributes + ) + return json_dict class LDAPQuery(CallbackInterface, crud.PKQuery): """ |