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
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ovirt-4.0.2
: 4.0.2
Assignee: Juan Hernández
QA Contact: Lucie Leistnerova
Depends On:
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:
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)

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:

Permission [dataCenter|cluster|host|storageDomain|vm|vmpool|] required for add
<reason>Incomplete parameters</reason>

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):

How reproducible:

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

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

Actual results:
POST call fails with:

Permission [dataCenter|cluster|host|storageDomain|vm|vmpool|] required for add
<reason>Incomplete parameters</reason>

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-

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