Bug 890327

Summary: ovirt-engine-sdk: return error if amount of fetched objects (by-name) in X.get() is > 1
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-sdkAssignee: Michael Pasternak <mpastern>
Status: CLOSED CURRENTRELEASE QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: bazulay, dyasny, ecohen, iheim, mpastern, oramraz, pstehlik, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Improvement
Target Release: 3.2.0Flags: dyasny: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: sf13-beta2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 947383 (view as bug list) Environment:
Last Closed: 2012-12-26 12:47:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 947085, 947383    

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