Bug 967547 - [restapi] Incorrect links at /groups url.
[restapi] Incorrect links at /groups url.
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.3.0
Assigned To: Ori Liel
Ondra Machacek
: Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-05-27 08:13 EDT by Ondra Machacek
Modified: 2016-02-10 14:10 EST (History)
7 users (show)

See Also:
Fixed In Version: is2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-18 09:02:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 15515 None None None Never

  None (edit)
Description Ondra Machacek 2013-05-27 08:13:33 EDT
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):

How reproducible:

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 03:18:16 EDT

*** This bug has been marked as a duplicate of bug 920483 ***
Comment 2 Michael Pasternak 2013-05-28 03:20:27 EDT

it sounds exactly as bug 920483, please recheck against it, thanks.
Comment 3 Ondra Machacek 2013-06-03 04:00:54 EDT
(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"/>

intead of:

<groups><group ..>
<link href="/api/domains/72686576-2e6c-6162-2e65-6e672e627271/groups/db5da949-a67e-4b25-bd5c-f31bbcacfde4/permissions" rel="permissions"/>
Comment 4 Michael Pasternak 2013-06-03 04:08:08 EDT
Thanks Ondra, we will address this.
Comment 5 Ori Liel 2013-06-10 08:53:52 EDT

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