On 11/19/2012 02:07 PM, Vojtech Szocs wrote:
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.

ok, so we only pass the ID for now. good.


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]" }

just make sure the entity matches the REST API entity.
(which probably means entityId should be changed to id?)


Vojtech


----- Original Message -----
From: "Itamar Heim" <[email protected]>
To: "Vojtech Szocs" <[email protected]>
Cc: "engine-devel" <[email protected]>
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



_______________________________________________
Engine-devel mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-devel

Reply via email to