Bug 962389

Summary: RHEVM-CLI: rhevm-shell returns not user friendly error after passing string to -S parameter
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilia Meerovich <iliam>
Component: ovirt-engine-cliAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Meerovich <iliam>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, iheim, jkt, juan.hernandez, oramraz, Rhev-m-bugs, srevivo, yeylon
Target Milestone: ---   
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: 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 Ilia Meerovich 2013-05-13 10:46:07 UTC
sf15:

[imeerovi@imeerovi ART]$ /usr/bin/rhevm-shell -c --url=https://leonid_rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I  -S foo 

error: invalid literal for int() with base 10: 'foo'

Comment 1 Ilia Meerovich 2013-05-13 12:34:42 UTC
I can see that actually I can pass negative value to sdk without any error message:

In [5]: api = API(url='https://leonid_rhevm.qa.lab.tlv.redhat.com:443/api/', username='admin@internal', password='123456', insecure=True, session_timeout=-10)

Comment 2 Michael Pasternak 2013-05-13 13:40:17 UTC
(In reply to comment #1)
> I can see that actually I can pass negative value to sdk without any error
> message:
> 
> In [5]: api = API(url='https://leonid_rhevm.qa.lab.tlv.redhat.com:443/api/',
> username='admin@internal', password='123456', insecure=True,
> session_timeout=-10)

negative numbers have same meaning as 0, i.e TTL is disabled.

Comment 3 Ilia Meerovich 2013-07-03 08:39:54 UTC
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S foo
Password: 



error: value used for the "SESSION_TIMEOUT" is "foo", while <type int> is expected.



        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S -1
Password: 

 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S 0x0
Password: 


error: value used for the "SESSION_TIMEOUT" is "0x0", while <type int> is expected.



        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S 10
Password: 



 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S '10'
Password: 

 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S 10o0
Password: 


error: value used for the "SESSION_TIMEOUT" is "10o0", while <type int> is expected.



        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]# exit
[root@ilia-rhevm ~]#  /usr/bin/rhevm-shell -c --url=https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I -S foo
Password: 

error: value used for the "SESSION_TIMEOUT" is "foo", while <type int> is expected.



        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]# exit

Comment 5 Itamar Heim 2014-01-21 22:25:30 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:26:09 UTC
Closing - RHEV 3.3 Released

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