[Engine-devel] Logical network Usages collection problematic approach

Ori Liel oliel at redhat.com
Tue May 1 13:27:00 UTC 2012


>----- Original Message -----
>From: "avi tal" <atal at redhat.com>
>To: "Ori Liel" <oliel at redhat.com>
>Cc: "michael pasternak" <mpastern at redhat.com>, engine-devel at ovirt.org
>Sent: Tuesday, May 1, 2012 3:58:35 PM
>Subject: Logical network Usages collection problematic approach
>
>Hi,
>The new design of logical network 'usages' collection came out a bit 
>problematic or shall i say annoying.
>The idea is to send the entire collection elements every time a user 
>wants to update a single usage otherwise the missing elements will be 
>automatically removed from the collection.
>
>Example:
>having <usages><usage>VM</usage><usages>
>1. in order to add 'display' usage to the collection i must send 'vm' as 
>well.
>2. to remove an element from the collection, i must send the entire 
>collection without the desired element
>(note: in this case it is only one extra element for every update but in 
>other cases it could be much more)
>
>
>The solution should be:
><usages><vm>true</vm><display>false</display></usages>
>That way we can send a single usage having different boolean text 
>without including the entire collection elements.

The question is, how flexible should usages be. If we don't expect 
more usages to be added in the future, then the hard-coded modelling
that you suggest is ok, and I have no problem with it. If more usages 
are expected to be added, then there's added value to keeping it generic.

Ori



More information about the Engine-devel mailing list