Bug 890327 - ovirt-engine-sdk: return error if amount of fetched objects (by-name) in X.get() is > 1
Summary: ovirt-engine-sdk: return error if amount of fetched objects (by-name) in X.ge...
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
medium
medium
Target Milestone: ---
: 3.2.0
Assignee: Michael Pasternak
QA Contact: Barak Dagan
URL:
Whiteboard: infra
: 947383 (view as bug list)
Depends On:
Blocks: 947085 947383
TreeView+ depends on / blocked
 
Reported: 2012-12-26 12:33 UTC by Barak Dagan
Modified: 2016-02-10 19:30 UTC (History)
11 users (show)

Fixed In Version: sf13-beta2
Doc Type: Enhancement
Doc Text:
Clone Of:
: 947383 (view as bug list)
Environment:
Last Closed: 2012-12-26 12:47:40 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:
dyasny: Triaged+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 12680 0 None None None Never
oVirt gerrit 13511 0 None None None Never

Description Barak Dagan 2012-12-26 12:33:43 UTC
Description of problem:
When there is use of '*' as part of object name, the first object is manipulated, instead of all them, for example, if I have 3 vms: myVm-0, myVm-1, myVm-2 and I want to start all of them: action vm myVm-* start, only myVm-0 will start.


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:
either all vms should be started, or the actions should fail on syntax error

Additional info:

Comment 1 Michael Pasternak 2012-12-26 12:47:40 UTC
this kind of behaviour is not supported, action invoked on a single object and
not on the list of objects,

providing wildcard name, will fetch first object answering on this constraint,
what is by-design.

Comment 2 Oded Ramraz 2012-12-26 13:19:50 UTC
I still think that this behavior is confusing , especially for someone who is familiar with BE search engine where "*" has different meaning. 
I would either perform the operation on multiple objects ( and turning this issue to be essential RFE ) or failing the action with proper error / invalid syntax. 


(In reply to comment #1)
> this kind of behaviour is not supported, action invoked on a single object
> and
> not on the list of objects,
> 
> providing wildcard name, will fetch first object answering on this
> constraint,
> what is by-design.

Comment 3 Michael Pasternak 2012-12-26 13:23:29 UTC
(In reply to comment #2)
> I still think that this behavior is confusing , especially for someone who
> is familiar with BE search engine where "*" has different meaning. 
> I would either perform the operation on multiple objects ( and turning this
> issue to be essential RFE ) or failing the action with proper error /
> invalid syntax. 
> 

ok, i'm buying it, i will return error is amount of returned objects > 1.

Comment 8 Michael Pasternak 2013-04-02 10:41:33 UTC
*** Bug 947383 has been marked as a duplicate of this bug. ***

Comment 9 Oded Ramraz 2013-04-28 13:48:41 UTC
[RHEVM shell (connected)]# action host aqua-* activate 

unknown error: [ERROR]::Used query (name=aqua-*) produces ambiguous results.

Verified sf14

Comment 10 Itamar Heim 2013-06-11 08:25:57 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 08:26:24 UTC
3.2 has been released


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