From 500e5be3a82fe1989af8262f72dde0076267e598 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Fri, 9 Nov 2012 09:23:18 +0100 Subject: script for configuring a vif in Xen in non-bridged mode Creates a new vif device without attaching it to a bridge. Quantum Linux Bridge Agent will attach the created device to the belonging bridge. Change-Id: I1818a92a47882d98e384b57e0fa84a0fa09d40ea --- contrib/xen/vif-openstack | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 contrib/xen/vif-openstack (limited to 'contrib') diff --git a/contrib/xen/vif-openstack b/contrib/xen/vif-openstack new file mode 100755 index 000000000..1df6ad6ac --- /dev/null +++ b/contrib/xen/vif-openstack @@ -0,0 +1,39 @@ +#!/bin/bash + +## vim: set syn=on ts=4 sw=4 sts=0 noet foldmethod=indent: +## copyright: B1 Systems GmbH , 2012. +## author: Christian Berendt , 2012. +## license: Apache License, Version 2.0 +## +## purpose: +## Creates a new vif device without attaching it to a +## bridge. Quantum Linux Bridge Agent will attach the +## created device to the belonging bridge. +## +## usage: +## place the script in ${XEN_SCRIPT_DIR}/vif-openstack and +## set (vif-script vif-openstack) in /etc/xen/xend-config.sxp. + +dir=$(dirname "$0") +. "$dir/vif-common.sh" + +case "$command" in + online) + setup_virtual_bridge_port "$dev" + ip link set $dev up + ;; + + offline) + ip link set $dev down + ;; + + add) + setup_virtual_bridge_port "$dev" + ip link set $dev up + ;; +esac + +if [ "$type_if" = vif -a "$command" = "online" ] +then + success +fi -- cgit