diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-01-15 21:39:34 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-01-15 21:39:34 +0000 |
commit | dac10bad5fcd89fda85562d7bfc6658c45126df1 (patch) | |
tree | 8acca8bd5137ec90ae061c848bf971e21de29ba9 /contrib | |
parent | a88152a476de4e5fc04d5b4e3b098527fdfb5a8f (diff) | |
parent | 500e5be3a82fe1989af8262f72dde0076267e598 (diff) | |
download | nova-dac10bad5fcd89fda85562d7bfc6658c45126df1.tar.gz nova-dac10bad5fcd89fda85562d7bfc6658c45126df1.tar.xz nova-dac10bad5fcd89fda85562d7bfc6658c45126df1.zip |
Merge "script for configuring a vif in Xen in non-bridged mode"
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/xen/vif-openstack | 39 |
1 files changed, 39 insertions, 0 deletions
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 <info@b1-systems.de>, 2012. +## author: Christian Berendt <berendt@b1-systems.de>, 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 |