Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1182275

Summary: [RFE] wildcarding api for mass-statistics
Product: [Retired] oVirt Reporter: Frank Ch. Eigler <fche>
Component: ovirt-engine-apiAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bugs, dsmith, ecohen, gklein, iheim, lsurette, rbalakri, s.kieske, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: 4.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-10 10:14:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank Ch. Eigler 2015-01-14 19:02:16 UTC
Further to bug #1059783, it would be nice if the /statistics
queries in the REST API had a mode whereby the server/engine
iterated across objects to return one bulk response, rather
than (what I believe is) the current requirement to enumerate
each target object, one per request.  So, for example, please
consider supporting not just:

GET /api/hosts/{host:id}/statistics
GET /api/vms/{vm:id}/nics/{nic:id}/statitics

but also something like:

GET /api/hosts/*/statistics
GET /api/vms/*/nics/*/statistics

and the xml/json results would naturally contain nested
structures, identifying the respective {host:id} or {nic:id}
etc. with a nested tag.

Comment 1 Juan Hernández 2015-01-15 07:44:22 UTC
Doing this is extremelly complicated as it breaks the assumption that one URI maps to one resource. Supporting that wildcard may just be impossible with Resteasy. Anyhow I'm targeting for 4.0 for later reconsideration.

Comment 2 Frank Ch. Eigler 2015-01-16 20:47:48 UTC
OK, until the point where you can reference a group of resources
under one URI / HTTP request, what is the preferred method for
fetching stats about all the resources?  A list-all-objects call
then N separate per-object calls?

Comment 3 Juan Hernández 2015-01-19 09:00:44 UTC
(In reply to Frank Ch. Eigler from comment #2)
> OK, until the point where you can reference a group of resources
> under one URI / HTTP request, what is the preferred method for
> fetching stats about all the resources?  A list-all-objects call
> then N separate per-object calls?

Yes, that is the only way.