Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354463 - Cannot add a permission for a vmPool to a user via API v4
Summary: Cannot add a permission for a vmPool to a user via API v4
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-4.0.2
: 4.0.2
Assignee: Juan Hernández
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-11 11:42 UTC by sefi litmanovich
Modified: 2016-08-12 14:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-12 14:25:37 UTC
oVirt Team: Virt
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 60483 master MERGED restapi: Fix validation of pool when adding permission 2016-07-13 13:08:45 UTC
oVirt gerrit 60645 ovirt-engine-4.0 MERGED restapi: Fix validation of pool when adding permission 2016-07-13 13:54:25 UTC

Description sefi litmanovich 2016-07-11 11:42:42 UTC
Description of problem:

Trying to add to some user a permission for a vm pool, e.g. userRole permission, fails with error message:

<fault>
<detail>
Permission [dataCenter|cluster|host|storageDomain|vm|vmpool|template.id] required for add
</detail>
<reason>Incomplete parameters</reason>
</fault>

Trying to add the same permission to a different entity, e.g. to a cluster, works fine.

Version-Release number of selected component (if applicable):
rhevm-4.0.2-0.2.rc1.el7ev.noarch

How reproducible:
always

Steps to Reproduce:
1. Create a vm pool.
2. Add a user to your system or just use user admin.
3. With api v4 try to add userRole permission to the user's permissions collection e.g.:

URL = https://{engine}/ovirt-engine/api/users/{user_id}/permissions
body:

<permission>
    <role href="/ovirt-engine/api/roles/00000000-0000-0000-0001-000000000001" id="00000000-0000-0000-0001-000000000001">
        <name>UserRole</name>
        <description>Standard User Role</description>
        <link href="/ovirt-engine/api/roles/00000000-0000-0000-0001-000000000001/permits" rel="permits"/>
        <administrative>false</administrative>
        <mutable>false</mutable>
    </role>
    <vm_pool href="/ovirt-engine/api/vmpools/{pool_id}" id="{pool_id}">....
    ...{full vm_pool xml}...
 </vm_pool>
</permission>

Actual results:
POST call fails with:

<fault>
<detail>
Permission [dataCenter|cluster|host|storageDomain|vm|vmpool|template.id] required for add
</detail>
<reason>Incomplete parameters</reason>
</fault>

Expected results:
permission is added to the user successfully 

Additional info:
No interesting information in engine.log

Comment 1 Red Hat Bugzilla Rules Engine 2016-07-11 11:57:27 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Lucie Leistnerova 2016-08-12 10:36:20 UTC
permission to vmpool added successfully

verified in ovirt-engine-restapi-4.0.2.6-0.1.el7ev.noarch


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