Previously, when adding a permission via the REST API the user had to specify the role identifier and not the role name. This meant that the user needed to look up the identifier, issuing an additional call to the top level 'roles' collection. Roles have human readable names, such as UserVmManager, but the REST API did not support specifying these names. Now, the REST API supports both ways to specify a role. This is also supported by the Python SDK, the Java SDK, and the RHEVM Shell.
DescriptionPrasad Mukhedkar
2014-10-15 10:43:06 UTC
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?
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2016-0376.html
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?