Bug 854391

Summary: ovirt-engine-cli: valid UUID's are treated as syntax error
Product: Red Hat Enterprise Virtualization Manager Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-cliAssignee: Michael Pasternak <mpastern>
Status: CLOSED CURRENTRELEASE QA Contact: Oded Ramraz <oramraz>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: bazulay, dyasny, ecohen, iheim, mkenneth, Rhev-m-bugs, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: si18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:56:58 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 2012-09-04 21:21:15 UTC
Description of problem:

RHEVM shell accept UUID's such as def00006-0000-0000-0000-def000000006 but doesn't accept UUID's which starts with a digit : e.g 00000000-0000-0000-0001-000000000001
See example in Additional Information . 

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


How reproducible:


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


Expected results:


Additional info:

[RHEVM shell (connected)]# list roles | grep 00
id         : 00000000-0000-0000-0001-000000000001
id         : 00000000-0000-0000-0001-000000000002
id         : def00006-0000-0000-0000-def000000006
id         : def00008-0000-0000-0000-def000000008

.....


[RHEVM shell (connected)]# list permits --role-identifier def00006-0000-0000-0000-def000000006

id         : 1
name       : create_vm

id         : 2
name       : delete_vm

id         : 3
name       : edit_vm_properties

id         : 4
name       : vm_basic_operations

....


[RHEVM shell (connected)]# list permits --role-identifier 00000000-0000-0000-0001-000000000001
error: syntax error

Comment 1 Michael Pasternak 2012-09-05 08:22:17 UTC
the problem is that you pass UUID where string is expected

Comment 2 Oded Ramraz 2012-09-05 08:27:03 UTC
(In reply to comment #1)
> the problem is that you pass UUID where string is expected

Why this operation succeed?

[RHEVM shell (connected)]# list permits --role-identifier def00006-0000-0000-0000-def000000006

id         : 1
name       : create_vm

id         : 2
name       : delete_vm

id         : 3
name       : edit_vm_properties

id         : 4
name       : vm_basic_operations

Comment 3 Michael Pasternak 2012-09-05 10:28:02 UTC
cause it starts with the letter and got boxed to string

Comment 5 Oded Ramraz 2012-09-13 09:38:56 UTC
Verified si18:

[RHEVM shell (connected)]# show vm 2041e0c8-b2a1-4dd5-8f94-e4b04215a622

id                        : 2041e0c8-b2a1-4dd5-8f94-e4b04215a622
name                      : fromtemplate
cluster-id                : 99408929-82cf-4dc7-a532-9d998063fa95
cpu-topology-cores        : 1
cpu-topology-sockets      : 1
creation_time             : 2012-09-12T12:25:25.464+03:00
display-address           : 10.35.103.11
display-allow_reconnect   : False
display-monitors          : 1
display-port              : 5900
display-secure_port       : 5901
display-type              : spice
high_availability-enabled : False
high_availability-priority: 1
host-id                   : 516eac3c-fca4-11e1-a24d-8b025e17fa1b
memory                    : 2147483648
memory_policy-ballooning  : True
memory_policy-guaranteed  : 2147483648
origin                    : rhev
os-boot-dev               : hd
os-type                   : rhel_6x64
placement_policy-affinity : migratable
quota-id                  : 00000000-0000-0000-0000-000000000000
start_time                : 2012-09-12T12:25:42.957+03:00
stateless                 : False
status-state              : up
template-id               : a734f08c-f2fa-4347-8c5b-a0032eb653d5
type                      : desktop
usb-enabled               : False