Assemble Xen NIC parameters into a dictionary

... instead of a string. This reduces the chance of programmer errors
and also eliminates the need to include comma separators everywhere.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Add a script for setting up the metad NIC for Xen

The script does the bare minimum required to set up the interface during
instance creation. The rest of the process is carried out by the ifup-os
script.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Use tools/vif-ganeti-metad when setting up Xen metad NIC

... and skip the setup used for regular NICs.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Check for all NICs when looking for a free metad NIC name

With Xen, the interfaces aren't set in 'tuntap' mode so 'ip tuntap list'
doesn't show them.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Do not hard-code python path

...in our automatically generated top-level python files.
Instead use the automatically detected python path.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Fix python shebang line in tools as well

While most of our top-level python scripts used to be generated
in the Makefile already, the scripts under tools used to be
"ready to use". However, in our current situation where the
python 2 interpreter is called different on different platforms
we still need to fix the shebang line. This patch achieves this
without moving source files around.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.10' into stable-2.11

* stable-2.10
  Fix python shebang line in tools as well
  Do not hard-code python path

Conflicts:
	Makefile.am (trivial)

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  (no changes)

* stable-2.10
  Fix python shebang line in tools as well
  Do not hard-code python path

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Check for all NICs when looking for a free metad NIC name
  Use tools/vif-ganeti-metad when setting up Xen metad NIC
  Add a script for setting up the metad NIC for Xen
  Assemble Xen NIC parameters into a dictionary

* stable-2.10
  Fix python shebang line in tools as well
  Do not hard-code python path

Conflicts:
	Makefile.am - take additions from both versions

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>