[Engine-devel] Extend host_nics action with UpdateNetworks

Simon Grinberg simon at redhat.com
Tue Mar 27 13:58:01 UTC 2012


----- Original Message ----- 

> From: "avi tal" <atal at redhat.com>
> To: engine-devel at ovirt.org
> Cc: "Oded Ramraz" <oramraz at redhat.com>, "Roy Golan"
> <rgolan at redhat.com>, "michael pasternak" <mpastern at redhat.com>,
> "Simon Grinberg" <simon at redhat.com>
> Sent: Tuesday, March 27, 2012 2:11:27 PM
> Subject: Extend host_nics action with UpdateNetworks

> Hi,
> I am checking the SetupNetwork feature in 3.1 (si01) and I think we
> are missing a very important implementation.
> SetupNetworks in vdsm layer is able to receive a nics collection
> which describe which nics will be updated and handle only those
> nics.
> This implementation is missing from engine-backend because backend
> automatically treat missing nics as nics we would like to remove.
> A very buggy scenario would be, missing mgmt network.

> The idea is to send (via REST API) a collection which contain only
> the interfaces (nics) we would like to update.

> This is actually an UPDATE collection procedure. it could be added as
> a different action:
> http://engine ip:port/hosts/id/nics/ updatenetworks

> I believe it is a part of the SetupNetwork feature that needs to be
> in 3.1.

+1

While for web UI it makes sense to do it in Read/Modify/Write fashion, meaning that the setup network dialogue shows the complete picture, allows the user to modify and then write it back. It does not make sense to force the same on an API user.

Consider a user that just wants to remove/add two logical networks on bond X. Does he really have to read it all, then add the networks, then send back? It makes sense to explicitly say update: add only those two on bond X - do not touch the rest.

This means though that the updateNetworks command has to explicitly say remove/add/update per network.  

> Thanks



More information about the Devel mailing list