(2.9) Make NIC setup more flexible in case of Xen
authorDimitris Aragiorgis <dimara@grnet.gr>
Wed, 26 Jun 2013 14:38:15 +0000 (17:38 +0300)
committerDimitris Aragiorgis <dimara@grnet.gr>
Tue, 17 Dec 2013 10:46:25 +0000 (12:46 +0200)
commit865cdc2e080f6b77d0cc2c5970d8c0f46e5ea602
tree708ed7b8e44751f536ade6fbf1d1680300c88b77
parentadea59b3614e796a9b7fa9fdac9b9fd7d7500c47
(2.9) Make NIC setup more flexible in case of Xen

For every NIC write down a file that contains NIC's
info (MAC, mode, link, network details), that can
be sourced by any vif script.  The file location is:
/var/run/ganeti/xen-hypervisor/nic/<domname>/<nicidx>.

This file is created upon cfg file creation and before
starting the instance and can be sourced by an external
script. Before file creation ensure that all parent dirs
exist.

Cleanup NIC dir when removing config files. Upon Xen
configuration file removal, remove NIC dir as well.

Add new hv param vif_script that allows execution of
user defined networking script and overrides the one
xend is configured with in xend-config.sxp

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
lib/constants.py
lib/hypervisor/hv_xen.py