Bug 882710 - [RESTAPI] Add group doesn't work.
Summary: [RESTAPI] Add group doesn't work.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.2.0
Assignee: Ravi Nori
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks: 915537
TreeView+ depends on / blocked
 
Reported: 2012-12-02 20:28 UTC by Ondra Machacek
Modified: 2016-02-10 19:38 UTC (History)
10 users (show)

Fixed In Version: SF3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ondra Machacek 2012-12-02 20:28:09 UTC
Description of problem:


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


How reproducible:
always

Steps to Reproduce:
1. Try add group via API.
  
Actual results:
status: 404
reason: Not Found
detail: HTTP Status 404

Expected results:
Group is added.

Additional info:
API:
POST /api/groups <group><name>domain.com/Users/Group</name></group>

SDK:
g = API.groups.get('Everyone')
API.groups.add(g)

Comment 1 Ravi Nori 2012-12-04 08:38:25 UTC
Works for me when I add a group that exists in the active directory

curl -X POST -d @14_addGroup.xml -u vdcadmin.tlv.redhat.com:123456 -H "Accept: application/xml" -H "Content-Type: application/xml" http://127.0.0.1:8700/api/groups

Where the contents of the file 14_addGroup.xml is
<group><name>qa.lab.tlv.redhat.com/Users/HelpServicesGroup</name></group>




When I add a group that does not exist, the api throws a 404 error. This is the intended behaviour.

curl -X POST -d @14_addGroup2.xml -u vdcadmin.tlv.redhat.com:123456 -H "Accept: application/xml" -H "Content-Type: application/xml" http://127.0.0.1:8700/api/groups

Where the contents of the file 14_addGroup2.xml is
<group><name>qa.lab.tlv.redhat.com/Users/DoesNotExist</name></group>

Comment 2 Ondra Machacek 2012-12-04 09:09:30 UTC
Yes thats true, but also don't work when I try to add group that exists in AD, when user is admin@internal, so when the user is in different AD.

When try to add group as a user in same AD, it works.

Comment 3 Michael Pasternak 2012-12-04 09:20:24 UTC
(In reply to comment #2)
> Yes thats true, but also don't work when I try to add group that exists in
> AD, when user is admin@internal, so when the user is in different AD.
> 
> When try to add group as a user in same AD, it works.

not sure this is a bug cause you did not authenticated to this AD...,

Miki?

Comment 4 Yaniv Kaul 2012-12-04 09:31:43 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Yes thats true, but also don't work when I try to add group that exists in
> > AD, when user is admin@internal, so when the user is in different AD.
> > 
> > When try to add group as a user in same AD, it works.
> 
> not sure this is a bug cause you did not authenticated to this AD...,

RHEV is supposed to do it, using the credentials stored when that domain was added.

> 
> Miki?

Comment 5 Ravi Nori 2012-12-04 11:35:34 UTC
link : http://gerrit.ovirt.org/#/c/9692/

change id : I20927d4732af6a22702c65c0f32f072039cb82e9

This patch lets us add groups from any domain irrespective of credentials used.

Also lets us add groups by id.

Comment 7 Ravi Nori 2012-12-05 09:13:11 UTC
Hash : 869505920388827dbf3af148f4a5d048cad52f35

Comment 10 Itamar Heim 2013-06-11 09:30:45 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 09:32:32 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 09:48:24 UTC
3.2 has been released


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