Hi Itamar,
UI plugin infrastructure translates internal business entities into JSON-like
representations and passes those representations to UI plugins. (Internal entities are NOT
exposed to UI plugins directly.)
Currently, all entities supported by UI plugin infrastructure (as per
org.ovirt.engine.ui.webadmin.plugin.entity.EntityType) are transformed into following
representation:
{ entityId: "[BusinessEntityGuidAsString]" }
For example, a VM entity with entity ID "vm123" will translate to:
{ entityId: "vm123" }
Translation is currently based on
org.ovirt.engine.core.common.businessentities.BusinessEntity interface, like so:
"BusinessEntity<? extends NGuid>" (we expect ID type parameter to be
NGuid-compatible). However, I've found that there are some entities (like Pool -
org.ovirt.engine.core.common.businessentities.vm_pools) that don't implement
BusinessEntity interface.
Quick question to backend folks - IIRC all entities extend
org.ovirt.engine.core.common.businessentities.IVdcQueryable, but not all entities
implement org.ovirt.engine.core.common.businessentities.BusinessEntity interface. What is
the precise relation between IVdcQueryable and BusinessEntity?
As for UI plugins, currently all entities get translated to above mentioned basic
JSON-like representation. You can see the relevant code in
org.ovirt.engine.ui.webadmin.plugin.entity.BaseEntity.from() static method. There's a
TODO that says "make this class [BaseEntity] abstract and create specific entity for
each EntityType" - this means we are planning to extend the above mentioned basic
JSON-like representation for different entity types.
For example, for a VM entity we might do:
{ entityId: "[BusinessEntityGuidAsString]", osType: "[VmOsType]" }
Vojtech
----- Original Message -----
From: "Itamar Heim" <iheim(a)redhat.com>
To: "Vojtech Szocs" <vszocs(a)redhat.com>
Cc: "engine-devel" <engine-devel(a)ovirt.org>
Sent: Friday, November 16, 2012 5:24:52 PM
Subject: Re: [Engine-devel] UI Plugins: PoC patch revision 7 is here
On 11/16/2012 06:08 PM, Vojtech Szocs wrote:
> is there a clear list of all APIs supported now?
Not yet, unfortunately, this should be part of "for plugin developers" wiki
that is planned to be written in upcoming weeks.
i just wanted to review how we solved not using internal entities as
part of the API