Bug 908284

Summary: ovirt-engine-cli: Bad error message when trying to create a new Role [ TEXT ]
Product: Red Hat Enterprise Virtualization Manager Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-cliAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Barak Dagan <bdagan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, bazulay, iheim, jkt, oramraz, pstehlik, Rhev-m-bugs
Target Milestone: ---Keywords: Reopened
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 06:07:11 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 Oded Ramraz 2013-02-06 10:36:12 UTC
Description of problem:

Bad error message when trying to create a new Role without passing the collection correctly : "unknown error: 'int' object has no attribute 'split'" 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

## collection is not passed correctly 

[RHEVM shell (connected)]# add role --name aaa --permits-permit 31

unknown error: 'int' object has no attribute 'split'


## wrong permit id ( will file a new bug for this issue ) 

[RHEVM shell (connected)]# add role --name aaa --permits-permit "permit.id=30" --administrative true

error:
status: 500
reason: Internal Server Error
detail: HTTP Status 500

## finally succeeded to add Role: 

[RHEVM shell (connected)]# add role --name aaa --permits-permit "permit.id=301" --administrative true

id            : c6b34030-4ee7-4344-bd72-35ca65dcfc1a
name          : aaa
administrative: True
mutable       : True

Comment 1 Michael Pasternak 2013-02-06 11:02:36 UTC
this was already fixed, please recheck against latest cli.

Comment 2 Oded Ramraz 2013-02-06 14:18:40 UTC
I'm using sf5 , rhevm-cli-3.2.0.3-1.el6ev.noarch

Comment 3 Michael Pasternak 2013-02-06 14:49:50 UTC
(In reply to comment #0)
> 
> ## wrong permit id ( will file a new bug for this issue ) 
> 
> [RHEVM shell (connected)]# add role --name aaa --permits-permit
> "permit.id=30" --administrative true
> 
> error:
> status: 500
> reason: Internal Server Error
> detail: HTTP Status 500
> 

btw oded i would report api error for ^ this (wrong permit.id cause 500).

Comment 4 Michael Pasternak 2013-03-11 10:19:00 UTC
*** Bug 920027 has been marked as a duplicate of this bug. ***

Comment 6 Barak Dagan 2013-09-15 15:25:50 UTC
Verified on is14

[RHEVM shell]# add role --name aaa --permits-permit 31


error: "31" is invalid segment at option "--permits-permit".


[RHEVM shell]# add role --name aaa --permits-permit "permit.id=30" --administrative true

error: 
status: 400
reason: Bad Request
detail: 
30 is not a valid permit ID.

[RHEVM shell]# add role --name aaa --permits-permit "permit.id=301" --administrative true

id            : f1669c81-7301-454a-862a-f8d36266f131
name          : aaa
administrative: True
mutable       : True

Comment 7 Itamar Heim 2014-01-21 22:30:37 UTC
Closing - RHEV 3.3 Released

Comment 8 Itamar Heim 2014-01-21 22:30:37 UTC
Closing - RHEV 3.3 Released

Comment 9 Itamar Heim 2014-01-21 22:33:37 UTC
Closing - RHEV 3.3 Released