Bug 1152989

Summary: [RFE] Allow use of role names in api definitions
Product: Red Hat Enterprise Virtualization Manager Reporter: Prasad Mukhedkar <pmukhedk>
Component: ovirt-engineAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED ERRATA QA Contact: Antonin Pagac <apagac>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: bazulay, gassmann, iheim, juan.hernandez, lsurette, melewis, oourfali, rbalakri, Rhev-m-bugs, sherold, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rcKeywords: FutureFeature
Target Release: 3.6.0Flags: sherold: Triaged+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
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.
Story Points: ---
Clone Of:
: 1219829 1219831 (view as bug list) Environment:
Last Closed: 2016-03-09 20:41:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1219829, 1219831    

Description Prasad 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?

Comment 4 Max Kovgan 2015-06-28 14:12:07 UTC
ovirt-3.6.0-3 release

Comment 5 Antonin Pagac 2015-07-02 10:22:39 UTC
Verified in: ovirt-engine-restapi-3.6.0-0.0.master.20150627185750.git6f063c1.el6.noarch

Comment 8 errata-xmlrpc 2016-03-09 20:41:17 UTC
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