nova/contrib/xen/vif-openstack
Christian Berendt bc554b9fa8 changed quantum to neutron in vif-openstack
Change-Id: I50c14066584527a6fbc25c59b0bf03a321a5f1f5
2014-02-13 15:23:45 +01:00

39 lines
856 B
Bash
Executable File

#!/bin/bash
## 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. Neutron 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