On Wed, Feb 15, 2012 at 06:36:48PM +0200, Dan Kenigsberg wrote:
> On Thu, Feb 16, 2012 at 12:05:16AM +0800, Lei Li wrote:
> > Hi,
> > 
> > We are working on VDSM network REST APIs, to support the functions we need 
> > to get
> > the list of configured networks. I found that VDSM network has a function
> > 'listNetworks' in configNetwork.py. It can get and display the current 
> > configured
> > network like this:
> > 
> > # python configNetwork.py list
> > Networks: ['bridge_one', 'bridge_three', 'bridge_two']
> > Vlans: []
> > Nics: ['eth0']
> > Bondings: []
> > 
> > But there are some problems with it. It can not display the defined 
> > networks after
> > host restart, but the created config file are still 
> > there(/etc/sysconfig/network-scripts/..).
> > Did I miss anything? Or Is there some way to avoid this?
> > 
> > Your suggestion and thoughts would be appreciated.

Lei, on my vdsm host, running python /usr/share/vdsm/configNetwork.py list gives
me the following output:

Networks: ['ovirtmgmt']
Vlans: []
Nics: ['eth1', 'eth0']
Bondings: ['bond4', 'bond0', 'bond1', 'bond2', 'bond3']

and python /usr/share/vdsm/configNetwork.py show ovirtmgmt gives:

Bridge ovirtmgmt: vlan=None, bonding=None, nics=['eth0']

These results are what I would expect to see.

> Could you describe how you reproduce the problem (with as much details)?
> You define a network, persist it, and restart the host?

Hi Dan.  As I understand it there is not a problem with vdsm in this regard.
Lei is trying to model the current networking APIs in REST.  To do this you
might have something like:

/vdsm-api/networks/ ..................Get a list of bridges configured for vdsm
/vdsm-api/networks/confirm............Mark the current network config as safe
/vdsm-api/networks/add................Add a new network
/vdsm-api/networks/ovirtmgmt/.........View details of the ovirtmgmt network
/vdsm-api/networks/ovirtmgmt/edit.....Edit the ovirtmgmt network
/vdsm-api/networks/ovirtmgmt/delete...Delete the ovirtmgmt network

The current vdsm API lacks a facility to display the /vdsm-api/networks/ URI
because there is no function to get such a list.  To create such an API, one
might call out to 'configNetwork.py list'.  Is there support for adding such an
API to API.py?  How about an API to fetch network info via 
configNetwork.py show?  

Also, I think the networking APIs should be organized into a Network class 
within API.py.

> Did Vdsm restart after boot? What is reported by getVdsCaps ?

Adam Litke <a...@us.ibm.com>
IBM Linux Technology Center

vdsm-devel mailing list

Reply via email to