Michael Pasternak has posted comments on this change.
Change subject: sdk: Apply filter by name/alias after get
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
i guess this won't work after Bug #1155967 is fixed, cause
?search won't return any result when filter=true,
the fix should be (when filter=true):
1. don't append ?search to url via SearchHelper.appendQuery()
2. use FilterHelper.filter(result, {'name':name}) on returned collection
this way you kill both things in one hit, i.e it will work
now and after this issue is fixed in api
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,
IIRC FilterHelper.getItem() returns first object in collection or throws
AmbiguousQueryError so you should not reach this code?
or am i missing something?
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 <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches