From c628cc38c44d2af1e20fea344a386e57266b7d92 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 16 Jun 2014 15:49:23 +0200 Subject: [PATCH] Add network configuration templates This changeset adds templates used by osbash/wbatch guest-side scripts when creating network configuration files. The template-ubuntu-interfaces-* files are for /etc/network/interfaces (as used by Ubuntu and Debian). The template-fedora-ifcfg-* files are for ifcfg- files in /etc/sysconfig/network-scripts/ (as used by Fedora). Partial-Bug: 1312764 Implements: blueprint openstack-training-labs Change-Id: I0aebc71e416bf931aa698d66d9e135ba05fda017 --- labs/lib/osbash/templates/template-fedora-ifcfg-hostonly | 5 +++++ labs/lib/osbash/templates/template-fedora-ifcfg-nat | 4 ++++ .../lib/osbash/templates/template-ubuntu-interfaces-hostonly | 4 ++++ .../lib/osbash/templates/template-ubuntu-interfaces-loopback | 3 +++ labs/lib/osbash/templates/template-ubuntu-interfaces-nat | 3 +++ 5 files changed, 19 insertions(+) create mode 100644 labs/lib/osbash/templates/template-fedora-ifcfg-hostonly create mode 100644 labs/lib/osbash/templates/template-fedora-ifcfg-nat create mode 100644 labs/lib/osbash/templates/template-ubuntu-interfaces-hostonly create mode 100644 labs/lib/osbash/templates/template-ubuntu-interfaces-loopback create mode 100644 labs/lib/osbash/templates/template-ubuntu-interfaces-nat diff --git a/labs/lib/osbash/templates/template-fedora-ifcfg-hostonly b/labs/lib/osbash/templates/template-fedora-ifcfg-hostonly new file mode 100644 index 00000000..0096a958 --- /dev/null +++ b/labs/lib/osbash/templates/template-fedora-ifcfg-hostonly @@ -0,0 +1,5 @@ +DEVICE=%IF_NAME% +ONBOOT=yes +BOOTPROTO=none +IPADDR=%IP_ADDRESS% +NETMASK=255.255.255.0 diff --git a/labs/lib/osbash/templates/template-fedora-ifcfg-nat b/labs/lib/osbash/templates/template-fedora-ifcfg-nat new file mode 100644 index 00000000..5b800ec8 --- /dev/null +++ b/labs/lib/osbash/templates/template-fedora-ifcfg-nat @@ -0,0 +1,4 @@ +# VirtualBox NAT -- for Internet access to VM +DEVICE=%IF_NAME% +ONBOOT=yes +BOOTPROTO=dhcp diff --git a/labs/lib/osbash/templates/template-ubuntu-interfaces-hostonly b/labs/lib/osbash/templates/template-ubuntu-interfaces-hostonly new file mode 100644 index 00000000..01c19476 --- /dev/null +++ b/labs/lib/osbash/templates/template-ubuntu-interfaces-hostonly @@ -0,0 +1,4 @@ +auto %IF_NAME% +iface %IF_NAME% inet static + address %IP_ADDRESS% + netmask 255.255.255.0 diff --git a/labs/lib/osbash/templates/template-ubuntu-interfaces-loopback b/labs/lib/osbash/templates/template-ubuntu-interfaces-loopback new file mode 100644 index 00000000..a6923a9d --- /dev/null +++ b/labs/lib/osbash/templates/template-ubuntu-interfaces-loopback @@ -0,0 +1,3 @@ +# The loopback network interface +auto lo +iface lo inet loopback diff --git a/labs/lib/osbash/templates/template-ubuntu-interfaces-nat b/labs/lib/osbash/templates/template-ubuntu-interfaces-nat new file mode 100644 index 00000000..bfc01382 --- /dev/null +++ b/labs/lib/osbash/templates/template-ubuntu-interfaces-nat @@ -0,0 +1,3 @@ +# VirtualBox NAT -- for Internet access to VM +auto eth0 +iface eth0 inet dhcp