+++ This bug was initially created as a clone of Bug #1152989 +++ Description of problem: Currently, If we want to add the role "UserVmManager" to a group we need to get the Id of that role first. Current API: <permission> <role id="00000000-0000-0000-0000-000000000001" /> <group id="abee5751-3857-46dd-abaa-03f57bca2e86"/> </permission> I would like to directly use the role name: <permission> <role><name>UserVmManager</name></role> <group id="abee5751-3857-46dd-abaa-03f57bca2e86"/> </permission> with most other resource references this already works, For example, network can be referenced by id or by name: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html-single/Technical_Guide/index.html#sect-Networks_Sub-Collection why not roles than?
ovirt-engine-sdk-python-3.6.0.0-0.15.20150625.gitfc90daf.el6.noarch Juan, can you please specify how to test this change in python sdk? I am able to add permission using: perm = Permission(role=api.roles.get("VmCreator"), user=api.users.get("myuser")) api.permissions.add(perm) However, I think this was possible also in previous versions of the sdk.
When you call api.roles.get("VmCreator") you are getting the complete role representation, including the name and the id. If you then pass this representation to the api.permissions.add(...) method then the server will use the id and ignore the name, that is why this worked in previous versions of the SDK. To verify the name is used correctly with the Python SDK you need to make sure that you are providing only the name, and not the id: api.permission.add( role=params.Role( name="VmCreator" ), ... )
ovirt-engine-sdk-python-3.6.0.0-0.15.20150625.gitfc90daf.el6.noarch Thanks Juan - verified.