Bug 967547 - [restapi] Incorrect links at /groups url.
Summary: [restapi] Incorrect links at /groups url.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.3.0
Assignee: Ori Liel
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-27 12:13 UTC by Ondra Machacek
Modified: 2016-02-10 19:10 UTC (History)
7 users (show)

Fixed In Version: is2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-18 13:02:18 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 15515 0 None None None Never

Description Ondra Machacek 2013-05-27 12:13:33 UTC
Description of problem:
There is an incorrect link to group permissions, roles and tags at /groups url.

Version-Release number of selected component (if applicable):
sf17.1

How reproducible:
always

Steps to Reproduce:
1. Add group from some domain to system.
2. Check /groups url.

Actual results:
There is broken link to group's permissions, roles and tags.
(/api/domains/{id}/groups/{id}/permissions,roles,tags) => HTTP 404

Expected results:
Correct link to group's permissions, roles and tags.
(/api/groups/{id}/permissions,roles,tags) without domain.

Additional info:

Comment 1 Michael Pasternak 2013-05-28 07:18:16 UTC

*** This bug has been marked as a duplicate of bug 920483 ***

Comment 2 Michael Pasternak 2013-05-28 07:20:27 UTC
Ondra,

it sounds exactly as bug 920483, please recheck against it, thanks.

Comment 3 Ondra Machacek 2013-06-03 08:00:54 UTC
(In reply to Michael Pasternak from comment #2)
> it sounds exactly as bug 920483, please recheck against it, thanks.

It is different than bug 920483.

When you add a group to system and than you want to for example check its permissions, there is incorrect link for group's permissions(also for tags and roles)

GET /api/groups

<groups><group href="/api/groups/eee00000-0000-0000-0000-123456789eee" id="eee00000-0000-0000-0000-123456789eee"></group><group href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4" id="db5da949-a67e-4b25-bd5c-f31bbcacfde4"><name>rhev.lab.eng.brq.redhat.com/Builtin/Users</name><link href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions" rel="permissions"/><link href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/roles" rel="roles"/><link href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/tags" rel="tags"/><domain href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271" id="72686576-2e6c-6162-2e65-6e672e627271"/></group></groups>

GET /api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions

HTTP 404

When I remove /domain/{domain:id} from url then the result is OK
GET /api/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions

<permissions><permission href="/api/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions/00000001-0001-0001-0001-000000000001" id="00000001-0001-0001-0001-000000000001"></permission></permissions>

So when you access to /groups url API should return:
<groups><group ..>
<link href="/api/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions" rel="permissions"/>
</group></groups>

intead of:

<groups><group ..>
<link href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions" rel="permissions"/>
</group></groups>

Comment 4 Michael Pasternak 2013-06-03 08:08:08 UTC
Thanks Ondra, we will address this.

Comment 5 Ori Liel 2013-06-10 12:53:52 UTC
http://gerrit.ovirt.org/15515


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