aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/assignment/routers.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-moon/keystone/assignment/routers.py')
-rw-r--r--keystone-moon/keystone/assignment/routers.py48
1 files changed, 42 insertions, 6 deletions
diff --git a/keystone-moon/keystone/assignment/routers.py b/keystone-moon/keystone/assignment/routers.py
index 49549a0b..9bef401e 100644
--- a/keystone-moon/keystone/assignment/routers.py
+++ b/keystone-moon/keystone/assignment/routers.py
@@ -71,7 +71,43 @@ class Routers(wsgi.RoutersBase):
routers.append(
router.Router(controllers.RoleV3(), 'roles', 'role',
- resource_descriptions=self.v3_resources))
+ resource_descriptions=self.v3_resources,
+ method_template='%s_wrapper'))
+
+ implied_roles_controller = controllers.ImpliedRolesV3()
+ self._add_resource(
+ mapper, implied_roles_controller,
+ path='/roles/{prior_role_id}/implies',
+ rel=json_home.build_v3_resource_relation('implied_roles'),
+ get_action='list_implied_roles',
+ status=json_home.Status.EXPERIMENTAL,
+ path_vars={
+ 'prior_role_id': json_home.Parameters.ROLE_ID,
+ }
+ )
+
+ self._add_resource(
+ mapper, implied_roles_controller,
+ path='/roles/{prior_role_id}/implies/{implied_role_id}',
+ put_action='create_implied_role',
+ delete_action='delete_implied_role',
+ head_action='check_implied_role',
+ get_action='get_implied_role',
+ rel=json_home.build_v3_resource_relation('implied_role'),
+ status=json_home.Status.EXPERIMENTAL,
+ path_vars={
+ 'prior_role_id': json_home.Parameters.ROLE_ID,
+ 'implied_role_id': json_home.Parameters.ROLE_ID
+ }
+ )
+ self._add_resource(
+ mapper, implied_roles_controller,
+ path='/role_inferences',
+ get_action='list_role_inference_rules',
+ rel=json_home.build_v3_resource_relation('role_inferences'),
+ status=json_home.Status.EXPERIMENTAL,
+ path_vars={}
+ )
grant_controller = controllers.GrantAssignmentV3()
self._add_resource(
@@ -159,11 +195,11 @@ class Routers(wsgi.RoutersBase):
'group_id': json_home.Parameters.GROUP_ID,
})
- routers.append(
- router.Router(controllers.RoleAssignmentV3(),
- 'role_assignments', 'role_assignment',
- resource_descriptions=self.v3_resources,
- is_entity_implemented=False))
+ self._add_resource(
+ mapper, controllers.RoleAssignmentV3(),
+ path='/role_assignments',
+ get_action='list_role_assignments_wrapper',
+ rel=json_home.build_v3_resource_relation('role_assignments'))
if CONF.os_inherit.enabled:
self._add_resource(