Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 947085 - [RHEVM-SDK] getItem() got an unexpected keyword argument 'query'
[RHEVM-SDK] getItem() got an unexpected keyword argument 'query'
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk (Show other bugs)
3.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.2.0
Assigned To: Michael Pasternak
Elena
infra
:
: 947401 950484 (view as bug list)
Depends On: 890327 947383
Blocks: 857028
  Show dependency treegraph
 
Reported: 2013-04-01 11:03 EDT by Shruti Sampat
Modified: 2016-02-10 14:16 EST (History)
18 users (show)

See Also:
Fixed In Version: sf13-beta2
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 Shruti Sampat 2013-04-01 11:03:04 EDT
Description of problem:
---------------------------------------
When the show command is given the name of the resource to be shown, it does not work and gives an error - 

[RHEVM shell (connected)]# show cluster --name test

unknown error: getItem() got an unexpected keyword argument 'query'
---------------------------------------

Giving the id of the same cluster to the show command works - 

[RHEVM shell (connected)]# show cluster --id 50a38e70-767a-496c-b7c9-766fbf71f52c

id                                         : 50a38e70-767a-496c-b7c9-766fbf71f52c
name                                       : test
data_center-id                             : 5849b030-626e-47cb-ad90-3ce782d831b3
error_handling-on_error                    : migrate
gluster_service                            : True
memory_policy-overcommit-percent           : 200
memory_policy-transparent_hugepages-enabled: True
threads_as_cores                           : False
version-major                              : 3
version-minor                              : 2
virt_service                               : False


Version-Release number of selected component (if applicable):
rhevm-cli-3.2.0.5-1.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Use the command 'list clusters' to list the clusters present.
2. For one of the clusters, use the show command to see its details providing the name of the cluster as follows - 

   show cluster --name <cluster-name>
  
Actual results:
The following error is seen - 

unknown error: getItem() got an unexpected keyword argument 'query'

Expected results:
The details of the cluster should be shown.

Additional info:
Comment 1 Michael Pasternak 2013-04-02 04:06:43 EDT
what sdk version you're using? (please run 'info' command), i can't
reproduce this on the latest [1], nor on [2] 3.2.0.5 you're using:

[1]

[RHEVM shell (connected)]# list clusters 

id         : 99408929-82cf-4dc7-a532-9d998063fa95
name       : Default
description: The default server cluster

[RHEVM shell (connected)]# show cluster --name Default

id                                         : 99408929-82cf-4dc7-a532-9d998063fa95
name                                       : Default
description                                : The default server cluster
data_center-id                             : 5849b030-626e-47cb-ad90-3ce782d831b3
error_handling-on_error                    : migrate
gluster_service                            : False
memory_policy-overcommit-percent           : 100
memory_policy-transparent_hugepages-enabled: True
threads_as_cores                           : False
version-major                              : 3
version-minor                              : 2
virt_service                               : True


[RHEVM shell (connected)]# info

sdk version    : 3.2.0.6
cli version    : 3.2.0.6

[2]
sdk version    : 3.2.0.5
cli version    : 3.2.0.5
Comment 2 Michael Pasternak 2013-04-02 04:31:55 EDT
i just got similar complain [1], this could happen only if you had
dirty environment (had dev artifacts installed with same version as rpm)
and then installed the rhevm-sdk,

1. un-install sdk rpm
2. clean  rhevm* in the /usr/lib/python2.7/site-packages
3. re-install sdk rpm

[1] 

API_admin = ovirtsdk.api.API(url='https://.../api', insecure=True,
        username='...', password='...', filter=False)
print API_admin.vms.get('abv')

===============================================================================
Traceback (most recent call last):
  File "./t.py", line 9, in <module>
    print API_admin.vms.get('abv')
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py", line 12956, in get
    query="name=" + name
TypeError: getItem() got an unexpected keyword argument 'query'
Comment 3 Shruti Sampat 2013-04-02 05:08:12 EDT
(In reply to comment #1)
> what sdk version you're using? (please run 'info' command), i can't
> reproduce this on the latest [1], nor on [2] 3.2.0.5 you're using:
> 
> [1]
> 
> [RHEVM shell (connected)]# list clusters 
> 
> id         : 99408929-82cf-4dc7-a532-9d998063fa95
> name       : Default
> description: The default server cluster
> 
> [RHEVM shell (connected)]# show cluster --name Default
> 
> id                                         :
> 99408929-82cf-4dc7-a532-9d998063fa95
> name                                       : Default
> description                                : The default server cluster
> data_center-id                             :
> 5849b030-626e-47cb-ad90-3ce782d831b3
> error_handling-on_error                    : migrate
> gluster_service                            : False
> memory_policy-overcommit-percent           : 100
> memory_policy-transparent_hugepages-enabled: True
> threads_as_cores                           : False
> version-major                              : 3
> version-minor                              : 2
> virt_service                               : True
> 
> 
> [RHEVM shell (connected)]# info
> 
> sdk version    : 3.2.0.6
> cli version    : 3.2.0.6
> 
> [2]
> sdk version    : 3.2.0.5
> cli version    : 3.2.0.5

info command on my machine gives the following output - 

sdk version    : 3.2.0.6
cli version    : 3.2.0.5
Comment 4 Michael Pasternak 2013-04-02 05:10:28 EDT
please perform cleanup i've mentioned in the comment 2 and let me know
if you still face this issue.
Comment 5 Michael Pasternak 2013-04-02 05:58:07 EDT
the cause for this bug is a lack of bug 890327 backport in 3.2
Comment 6 Michael Pasternak 2013-04-02 06:48:30 EDT
*** Bug 947401 has been marked as a duplicate of this bug. ***
Comment 7 Elena 2013-04-08 12:32:21 EDT
Verified in sf13
Comment 8 Haim 2013-04-15 01:25:50 EDT
*** Bug 950484 has been marked as a duplicate of this bug. ***
Comment 9 Itamar Heim 2013-06-11 04:31:20 EDT
3.2 has been released
Comment 10 Itamar Heim 2013-06-11 04:31:28 EDT
3.2 has been released
Comment 11 Itamar Heim 2013-06-11 04:32:59 EDT
3.2 has been released

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