Rationalize list role assignment routing

The v3 role assignment controller was created as a standard
controller even though it only supports the list method. This means
not only do we have code stubs that are unused, but this will
complicate the addition of separate entry points for listing role
assignments for a tree in the follow on patch.

This patch, therfore, rationalizes the routes so that this
is set up for just the list method, and removes the unused code
stubs.

Implements: bp list-assignment-subtree
Change-Id: I0c03accecdcf1608b50ad6b130c8a49d8a9b5b42
This commit is contained in:
Henry Nash 2015-09-04 06:59:00 +01:00
parent 8ad30b3c9b
commit ffc97c0735
2 changed files with 5 additions and 17 deletions

View File

@ -649,15 +649,3 @@ class RoleAssignmentV3(controller.V3Controller):
formatted_refs = [self._format_entity(context, ref) for ref in refs]
return self.wrap_collection(context, formatted_refs)
@controller.protected()
def get_role_assignment(self, context):
raise exception.NotImplemented()
@controller.protected()
def update_role_assignment(self, context):
raise exception.NotImplemented()
@controller.protected()
def delete_role_assignment(self, context):
raise exception.NotImplemented()

View File

@ -159,11 +159,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',
rel=json_home.build_v3_resource_relation('role_assignments'))
if CONF.os_inherit.enabled:
self._add_resource(