Bug 882710 - [RESTAPI] Add group doesn't work.
[RESTAPI] Add group doesn't work.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity high
: ---
: 3.2.0
Assigned To: Ravi Nori
Ondra Machacek
infra
:
Depends On:
Blocks: 915537
  Show dependency treegraph
 
Reported: 2012-12-02 15:28 EST by Ondra Machacek
Modified: 2016-02-10 14:38 EST (History)
10 users (show)

See Also:
Fixed In Version: SF3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondra Machacek 2012-12-02 15:28:09 EST
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 03:38:25 EST
Works for me when I add a group that exists in the active directory

curl -X POST -d @14_addGroup.xml -u vdcadmin@qa.lab.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@qa.lab.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 04:09:30 EST
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 04:20:24 EST
(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 04:31:43 EST
(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 06:35:34 EST
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 04:13:11 EST
Hash : 869505920388827dbf3af148f4a5d048cad52f35
Comment 10 Itamar Heim 2013-06-11 05:30:45 EDT
3.2 has been released
Comment 11 Itamar Heim 2013-06-11 05:32:32 EDT
3.2 has been released
Comment 12 Itamar Heim 2013-06-11 05:48:24 EDT
3.2 has been released

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