From d11e831ef18d97e64572c22658bd8ff06a70ae5c Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 25 Jan 2016 19:30:11 +0100 Subject: [PATCH] Add node network interface type manual The install guide uses a network interface of type "manual" for the public network. So far, we have used a static interface instead. This patch adds support for "manual" interfaces. Change-Id: Ibd2579deb2770e93c96ae710a970fda17c5e49a0 --- labs/osbash/lib/functions.ubuntu.sh | 2 ++ labs/osbash/lib/osbash/functions-host.sh | 2 ++ .../lib/osbash/templates/template-ubuntu-interfaces-manual | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual diff --git a/labs/osbash/lib/functions.ubuntu.sh b/labs/osbash/lib/functions.ubuntu.sh index acb31f21..33a73a6b 100644 --- a/labs/osbash/lib/functions.ubuntu.sh +++ b/labs/osbash/lib/functions.ubuntu.sh @@ -19,6 +19,8 @@ function config_netif { if [ "$if_type" = "dhcp" ]; then template="template-ubuntu-interfaces-dhcp" + elif [ "$if_type" = "manual" ]; then + template="template-ubuntu-interfaces-manual" else template="template-ubuntu-interfaces-static" fi diff --git a/labs/osbash/lib/osbash/functions-host.sh b/labs/osbash/lib/osbash/functions-host.sh index f007ed81..eb787dca 100644 --- a/labs/osbash/lib/osbash/functions-host.sh +++ b/labs/osbash/lib/osbash/functions-host.sh @@ -68,6 +68,8 @@ function configure_node_netifs { type=${NODE_IF_TYPE[index]} if [ "$type" = "dhcp" ]; then vm_nic_base "$vm_name" $index + elif [ "$type" = "manual" ]; then + vm_nic_std "$vm_name" $index elif [ "$type" = "static" ]; then vm_nic_std "$vm_name" $index else diff --git a/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual b/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual new file mode 100644 index 00000000..840b2ee2 --- /dev/null +++ b/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual @@ -0,0 +1,4 @@ +auto %IF_NAME% +iface %IF_NAME% inet manual +up ip link set dev $IFACE up +down ip link set dev $IFACE down