summaryrefslogtreecommitdiff
path: root/devstack/tools/ironic/scripts/create-node.sh
diff options
context:
space:
mode:
authorVladyslav Drok <vdrok@mirantis.com>2018-05-25 14:07:48 +0300
committerVladyslav Drok <vdrok@mirantis.com>2018-05-25 14:08:59 +0300
commitbe1b6a341f72966255f3a0515d6b97850198742e (patch)
treef87fd97b7830b919d98683dfe6c91be866c8360f /devstack/tools/ironic/scripts/create-node.sh
parentab6411fc943fd5bb51568467145680ea020e8d7a (diff)
downloadironic-be1b6a341f72966255f3a0515d6b97850198742e.tar.gz
Allow customizing libvirt NIC driver
This value will be used for creating virtual baremetal machines in the devstack plugin. Story: 2002079 Task: 19747 Change-Id: I69fbbadb8fdbb110d6e32013a4835e193f30c93d
Diffstat (limited to 'devstack/tools/ironic/scripts/create-node.sh')
-rwxr-xr-xdevstack/tools/ironic/scripts/create-node.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/devstack/tools/ironic/scripts/create-node.sh b/devstack/tools/ironic/scripts/create-node.sh
index 8cead28ad..f40186b58 100755
--- a/devstack/tools/ironic/scripts/create-node.sh
+++ b/devstack/tools/ironic/scripts/create-node.sh
@@ -12,7 +12,7 @@ export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
-while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:" arg; do
+while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:D:" arg; do
case $arg in
n) NAME=$OPTARG;;
c) CPU=$OPTARG;;
@@ -33,6 +33,7 @@ while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:A:" arg; do
L) UEFI_LOADER=$OPTARG;;
N) UEFI_NVRAM=$OPTARG;;
A) MAC_ADDRESS=$OPTARG;;
+ D) NIC_DRIVER=$OPTARG;;
esac
done
@@ -43,7 +44,7 @@ if [ -z "$UEFI_LOADER" ] && [ ! -z "$UEFI_NVRAM" ]; then
exit 1
fi
-LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"virtio"}
+LIBVIRT_NIC_DRIVER=${NIC_DRIVER:-"virtio"}
LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}