Bug 1152989 - [RFE] Allow use of role names in api definitions
Summary: [RFE] Allow use of role names in api definitions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Juan Hernández
QA Contact: Antonin Pagac
URL:
Whiteboard:
Depends On:
Blocks: 1219829 1219831
TreeView+ depends on / blocked
 
Reported: 2014-10-15 10:43 UTC by Prasad Mukhedkar
Modified: 2019-04-28 09:15 UTC (History)
13 users (show)

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.
Clone Of:
: 1219829 1219831 (view as bug list)
Environment:
Last Closed: 2016-03-09 20:41:17 UTC
oVirt Team: Infra
sherold: Triaged+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0376 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.6.0 2016-03-10 01:20:52 UTC
oVirt gerrit 40694 master MERGED core, restapi: Support adding permission using role name Never

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


Note You need to log in before you can comment on or make changes to this bug.