Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 967547

Summary: [restapi] Incorrect links at /groups url.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engine-restapiAssignee: Ori Liel <oliel>
Status: CLOSED UPSTREAM QA Contact: Ondra Machacek <omachace>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, iheim, jkt, mpastern, oramraz, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 13:02:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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