now we have support network get/create/delete/activate/deactivate
Now we need to support the attach/detach/
a Network to a guest.
And get the info of Network attached to a guest.
libvirt supports several types of network interfaces:
but there is not a unique "name" attribute for "interface" element.(more
libvirt network interfaces info)
That is not good to define our REST API.
But for "network" type resource, there is a "network" attribute of
And the value of "network" attribute is the name of network that we
defined by /networks POST method.
the "network" type + "network" attribute is unique.
We can define the Network Interfaces like this to support "network"
But this is not RESTFUL.
Maybe We can also name a Network Interface by the Interface mac.
The mac is unique.
The best way for user is get the NICS name in guest. such as eth0,
But there is a problem, we need get the nic name and mac from guest.
and Make a map in kimchi DB.
also the nic name may change, we need make the map consistence with
guest nic name.
IBM Linux Technology Center