Description of problem: Adding user roles (by role name) together with adding user itself doesn't seem to work -- role seems to be not assigned. Version-Release number of selected component (if applicable): rhevm ic154.1 How reproducible: Steps to Reproduce: 1. Post POST that adds user and assigns his role. 2. Observe the results. Actual results: role seems to be not assigned Expected results: role is assigned Additional info: 2012-04-12 14:55:22,824 - MainThread - utils.test_runner - INFO - Running command: testStatus = addUser(ovirtsdk_backend, 'TRUE', user_name='osapir', domain='rhev.lab.eng.brq.redhat.com', groups='RDP-Group.eng.brq.redhat.com/QA-All-Users', role='UserRole') 2012-04-12 14:55:22,833 - MainThread - ovirtsdk_backendovirtsdk_backend - DEBUG - http request, conn: <ovirtsdk.web.connection.Connection object at 0x7fce61efecd0> 2012-04-12 14:55:22,833 - MainThread - ovirtsdk_backendovirtsdk_backend - DEBUG - method: POST url: /api/users 2012-04-12 14:55:22,833 - MainThread - ovirtsdk_backendovirtsdk_backend - DEBUG - headers: {} 2012-04-12 14:55:22,833 - MainThread - ovirtsdk_backendovirtsdk_backend - DEBUG - body: <user> <name>osapir</name> <user_name>osapir.eng.brq.redhat.com</user_name> <roles> <role> <name>UserRole</name> </role> </roles> <groups> <group> <name>RDP-Group.eng.brq.redhat.com/QA-All-Users</name> </group> </groups> </user> curl https://jh-rhsetup.rhev.lab.eng.brq.redhat.com:8443/api/users/735fad3d-f56d-4612-a4d9-854104d13923/roles --basic -u *@* -k Enter host password for user '*@*': <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <roles/> `--> ssh jh-rh tail -fn0 /var/log/rhevm/rhevm.log | tee /tmp/logs/rhevm.log 2012-04-12 14:55:22,611 INFO [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-1) Running command: LoginAdminUserCommand internal: false. 2012-04-12 14:55:22,628 INFO [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-1) Running command: LogoutUserCommand internal: false. 2012-04-12 14:55:22,786 INFO [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-21) Running command: LoginAdminUserCommand internal: false. 2012-04-12 14:55:22,801 INFO [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-21) Running command: LogoutUserCommand internal: false. 2012-04-12 14:55:23,021 INFO [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-21) Running command: LoginAdminUserCommand internal: false. 2012-04-12 14:55:23,109 INFO [org.ovirt.engine.core.bll.AddUserCommand] (http-0.0.0.0-8443-21) Running command: AddUserCommand internal: false. Entities affected : ID: aaa00000-0000-0000-0000-123456789aaa Type: System 2012-04-12 14:55:23,129 INFO [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-21) Running command: LogoutUserCommand internal: false. ^CKilled by signal 2.
regression?
AFAIK It was not tested before. So no regression.
not sure it was ever implemented.
this is non-restful and non-atomic operation, roles should be added to user under /roles subcollection
(In reply to comment #5) > this is non-restful and non-atomic operation, roles should be added to user > under /roles subcollection Then ther is a bug in the doc. Am I right? http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html-single/REST_API_Guide/index.html#chap-REST_API_Guide-Users Example 19.2. Adding a user from directory service and assigning two roles
what's the status on his bug? we have a test failing in automation, so either we remove the test from automation code or apply a fix to the testing code. failing test: http://jenkins.eng.lab.tlv.redhat.com/view/Automation/view/rhevm_3.1/view/build%20branch%20+%20latest%20vdsm/job/rhevm_3.1_automation_restapi/lastCompletedBuild/testReport/(root)/Users/__423___Create_user/
as you can see: CLOSED WONTFIX
i see and understand. but ci still failing, so testing code should be removed/altered. i added needinfo for automation team to respond on this.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days