Juan Hernandez has posted comments on this change.

Change subject: sdk: Apply filter by name/alias after get
......................................................................


Patch Set 2:

(1 comment)

My expectation/hope about bug #1155967 is that it will be fixed so that the 
"search" parameter isn't ignored when filter is true. Once that is done this 
change will become irrelevant, and can be reverted (but not strictly needed). 
Meanwhile it solves bug #1155678 and also helps people that want to use 
"get(name=whatever)" combined with "filter=True" in the Python SDK.

http://gerrit.ovirt.org/#/c/34892/2/src/ovirtsdk/infrastructure/brokers.py
File src/ovirtsdk/infrastructure/brokers.py:

Line 2598:             ).get_cluster()
Line 2599: 
Line 2600:             return Cluster(
Line 2601:                 FilterHelper.getItem(
Line 2602:                     FilterHelper.filter(result, {'name':name}),
> Juan,
In this situation FilterHelper.filter is called first, to discard the objects 
that don't match the "name" given by the caller. After that 
FilterHelper.getItem is called to make sure that there is only one result.
Line 2603:                     query="name=" + name
Line 2604:                 ),
Line 2605:                 self.context
Line 2606:             )


-- 
To view, visit http://gerrit.ovirt.org/34892
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9baf549c68a93f329b76d41a2ce52b7a7e7b6c79
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8...@yahoo.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to