[Engine-devel] Fwd: Problem in REST API handling/displaying of logical networks

Michael Pasternak mpastern at redhat.com
Tue Jul 3 08:20:00 UTC 2012


On 07/03/2012 10:06 AM, Yaniv Kaul wrote:
> On 07/03/2012 10:00 AM, Itamar Heim wrote:
>> On 07/03/2012 09:51 AM, Avi Tal wrote:
>> ...
>>>
>>> Why do we keep holding this Top level collection instead of having each network related under his datacenter (/api/datacenter/id/networks)???
>>
>> why do we keep VMs as top level? they only exist in data center...
>> why do we keep Clusters as top level? they only exist in data center...
>> why do we keep Templates as top level? they only exist in data center...
> 
> What's the answer to all the above, btw?
> Y.

1. they are central entities in the system and should be easily accessed - simplicity.
2. ease on system initiation, i.e creating same sub-resource for different
   resources is much more easy when you don't have to switch resource
   collection every time.
3. hypermedia is the engine of the application state (one of the core REST principals).

> 
>>
>> all entities are available today as top level as well, so networks are there for consistency
>>
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=741111
>>>
>>> One solution which is must is to move the top level network (/api/networks) under each Datacenter!

not *move*, but to be added as well, we have RFE on this.

>>>
>>> 1. having top level networks path isn't symmetric to our entire REST API implementation!
>>>     all other network collections (cluster, hosts, VMs, Templates) placed under their related component.
>>> 2. as a REST API user, having sub collection networks under each datacenter is better to handle than parsing a top level collection
>>>     and comparing DC id in order to get all DC related networks.
>>> 3. as for breaking api/ backward compatibility, we can still hold the top level network collection ad deprecated and start exposing the sub collections
>>>     under each datacenter.
>> _______________________________________________
>> Engine-devel mailing list
>> Engine-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 
> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Engine-devel mailing list