Bug 947085 - [RHEVM-SDK] getItem() got an unexpected keyword argument 'query'
Summary: [RHEVM-SDK] getItem() got an unexpected keyword argument 'query'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Michael Pasternak
QA Contact: Elena
URL:
Whiteboard: infra
: 947401 950484 (view as bug list)
Depends On: 890327 947383
Blocks: 857028
TreeView+ depends on / blocked
 
Reported: 2013-04-01 15:03 UTC by Shruti Sampat
Modified: 2016-02-10 19:16 UTC (History)
18 users (show)

Fixed In Version: sf13-beta2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shruti Sampat 2013-04-01 15:03:04 UTC
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 08:06:43 UTC
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 08:31:55 UTC
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 09:08:12 UTC
(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 09:10:28 UTC
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 09:58:07 UTC
the cause for this bug is a lack of bug 890327 backport in 3.2

Comment 6 Michael Pasternak 2013-04-02 10:48:30 UTC
*** Bug 947401 has been marked as a duplicate of this bug. ***

Comment 7 Elena 2013-04-08 16:32:21 UTC
Verified in sf13

Comment 8 Haim 2013-04-15 05:25:50 UTC
*** Bug 950484 has been marked as a duplicate of this bug. ***

Comment 9 Itamar Heim 2013-06-11 08:31:20 UTC
3.2 has been released

Comment 10 Itamar Heim 2013-06-11 08:31:28 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 08:32:59 UTC
3.2 has been released


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