From 52fe25da2551ef25d3f667b6f8f9adfe335dca07 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Wed, 19 Dec 2018 17:29:58 +0100 Subject: [PATCH] Add unmanaged vm to nodepool functional tests In order to increase test coverage we should add an unmanaged vm to the functional tests. Change-Id: I3908c74ea6e581d61180e1b238e4d0e869751cf3 Depends-On: https://review.openstack.org/625923 --- devstack/plugin.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 8cacc8fec..19cd0d5bc 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -691,6 +691,10 @@ function start_nodepool { openstack --os-project-name demo --os-username demo security group rule create --ingress --protocol udp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default fi + # start an unmanaged vm that should be ignored by nodepool + local cirros_image=$(openstack --os-project-name demo --os-username demo image list | grep cirros | awk '{print $4}' | head -n1) + openstack --os-project-name demo --os-username demo server create --flavor cirros256 --image $cirros_image unmanaged-vm + # create root keypair to use with glean for devstack cloud. nova --os-project-name demo --os-username demo \ keypair-add --pub-key $NODEPOOL_PUBKEY $NODEPOOL_KEY_NAME @@ -715,6 +719,9 @@ function start_nodepool { function shutdown_nodepool { stop_process nodepool + + # Verify that the unmanaged vm still exists + openstack --os-project-name demo --os-username demo server show unmanaged-vm : }