summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-13 23:13:04 -0500
committerAdam Young <ayoung@redhat.com>2010-12-14 11:06:51 -0500
commite0a39234f777c9c32af639195ec198b08fd7d452 (patch)
tree455fe8fb2ca197f335e143d5eb4f8d81776302ac /ipalib
parentcd7b64103b24ce4b71420c8c93707046169c2c22 (diff)
downloadfreeipa-e0a39234f777c9c32af639195ec198b08fd7d452.tar.gz
freeipa-e0a39234f777c9c32af639195ec198b08fd7d452.tar.xz
freeipa-e0a39234f777c9c32af639195ec198b08fd7d452.zip
Add metadata for the selfservice and delegation plugins.
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/delegation.py14
-rw-r--r--ipalib/plugins/selfservice.py14
2 files changed, 28 insertions, 0 deletions
diff --git a/ipalib/plugins/delegation.py b/ipalib/plugins/delegation.py
index de39a8500..b9fc7f146 100644
--- a/ipalib/plugins/delegation.py
+++ b/ipalib/plugins/delegation.py
@@ -86,6 +86,9 @@ class delegation(Object):
Delegation object.
"""
+ bindable = False
+ object_name = 'delegation',
+ object_name_plural = 'delegation',
label = _('Delegation')
takes_params = (
@@ -118,6 +121,17 @@ class delegation(Object):
),
)
+ def __json__(self):
+ json_friendly_attributes = (
+ 'label', 'takes_params', 'bindable', 'name',
+ 'object_name', 'object_name_plural',
+ )
+ json_dict = dict(
+ (a, getattr(self, a)) for a in json_friendly_attributes
+ )
+ json_dict['methods'] = [m for m in self.methods]
+ return json_dict
+
api.register(delegation)
diff --git a/ipalib/plugins/selfservice.py b/ipalib/plugins/selfservice.py
index 6d34715ad..63c40f681 100644
--- a/ipalib/plugins/selfservice.py
+++ b/ipalib/plugins/selfservice.py
@@ -67,6 +67,9 @@ class selfservice(Object):
Selfservice object.
"""
+ bindable = False
+ object_name = 'selfservice',
+ object_name_plural = 'selfservice',
label = _('Permissions')
takes_params = (
@@ -89,6 +92,17 @@ class selfservice(Object):
),
)
+ def __json__(self):
+ json_friendly_attributes = (
+ 'label', 'takes_params', 'bindable', 'name',
+ 'object_name', 'object_name_plural',
+ )
+ json_dict = dict(
+ (a, getattr(self, a)) for a in json_friendly_attributes
+ )
+ json_dict['methods'] = [m for m in self.methods]
+ return json_dict
+
api.register(selfservice)