Bug 890327 - ovirt-engine-sdk: return error if amount of fetched objects (by-name) in X.get() is > 1
ovirt-engine-sdk: return error if amount of fetched objects (by-name) in X.ge...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.2.0
Assigned To: Michael Pasternak
Barak Dagan
infra
: Improvement
: 947383 (view as bug list)
Depends On:
Blocks: 947085 947383
  Show dependency treegraph
 
Reported: 2012-12-26 07:33 EST by Barak Dagan
Modified: 2016-02-10 14:30 EST (History)
11 users (show)

See Also:
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 07:47:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
dyasny: Triaged+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 12680 None None None Never
oVirt gerrit 13511 None None None Never

  None (edit)
Description Barak Dagan 2012-12-26 07:33:43 EST
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 07:47:40 EST
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 08:19:50 EST
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 08:23:29 EST
(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 06:41:33 EDT
*** Bug 947383 has been marked as a duplicate of this bug. ***
Comment 9 Oded Ramraz 2013-04-28 09:48:41 EDT
[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 04:25:57 EDT
3.2 has been released
Comment 11 Itamar Heim 2013-06-11 04:26:24 EDT
3.2 has been released

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