implement identity v3 Proxy "unassign_project_role_from_user"

identity/v3/_proxy.py lacks the reverse method of
 "assign_project_role_to_user" although this method is implemented
in Project class.
With this patchset call to
 conn.identity.unassign_project_role_from_user(project,user,role)
works

Fix no known issue; just adds functionnality

Change-Id: I066fcb378cb3b3449bbe12b6186caaf63432c2af
This commit is contained in:
b.haleblian 2019-01-08 00:56:49 +01:00
parent 445a5491db
commit 76ccd2c836
1 changed files with 15 additions and 0 deletions

View File

@ -1129,3 +1129,18 @@ class Proxy(proxy.Proxy):
"""
project = self._get_resource(_project.Project, project)
project.assign_role_to_user(self, user, role)
def unassign_project_role_from_user(self, project, user, role):
"""Unassign role from user on a project
:param project: Either the ID of a project or a
:class:`~openstack.identity.v3.project.Project`
instance.
:param user: Either the ID of a user or a
:class:`~openstack.identity.v3.user.User` instance.
:param role: Either the ID of a role or a
:class:`~openstack.identity.v3.role.Role` instance.
:return: ``None``
"""
project = self._get_resource(_project.Project, project)
project.unassign_role_from_user(self, user, role)