Merge "Remove transition code for old python-openstackclient release"
This commit is contained in:
@@ -117,26 +117,18 @@ function create {
|
||||
$net \
|
||||
$NOVA_SERVER --wait
|
||||
|
||||
# Add a floating IP because this is something which will work in
|
||||
# either n-net or neutron. More advanced server creates with
|
||||
# neutron should be done in neutron test.
|
||||
eval $(openstack floating ip create public -f shell -c id -c ip -c floating_ip_address)
|
||||
# NOTE(dhellmann): Around version 3.0.0 of python-openstackclient
|
||||
# the column name changed from "ip" to "floating_ip_address". We
|
||||
# look for both here to support upgrades.
|
||||
if [[ -z "$ip" ]]; then
|
||||
ip="$floating_ip_address"
|
||||
fi
|
||||
resource_save nova nova_server_ip $ip
|
||||
# Add a floating IP as a basic scenario. More advanced server creates
|
||||
# should be done in neutron test.
|
||||
eval $(openstack floating ip create public -f shell -c id -c floating_ip_address)
|
||||
resource_save nova nova_server_ip $floating_ip_address
|
||||
resource_save nova nova_server_float $id
|
||||
openstack server add floating ip $NOVA_SERVER $ip
|
||||
|
||||
openstack server add floating ip $NOVA_SERVER $floating_ip_address
|
||||
|
||||
uuid=$(openstack server show $NOVA_SERVER -f value -c id)
|
||||
resource_save nova nova_server_uuid $uuid
|
||||
|
||||
# ping check on the way up to ensure we're really running
|
||||
ping_check_public $ip $INSTANCE_WAIT
|
||||
ping_check_public $floating_ip_address $INSTANCE_WAIT
|
||||
|
||||
# Save some inventory and allocation values (requires admin)
|
||||
source_quiet $TOP_DIR/openrc admin admin
|
||||
|
||||
@@ -143,18 +143,11 @@ function create {
|
||||
$net \
|
||||
$CINDER_SERVER --wait
|
||||
|
||||
# Add a floating IP because this is something which will work in
|
||||
# either n-net or neutron.
|
||||
eval $(openstack floating ip create public -f shell -c id -c ip -c floating_ip_address)
|
||||
# NOTE(dhellmann): Around version 3.0.0 of python-openstackclient
|
||||
# the column name changed from "ip" to "floating_ip_address". We
|
||||
# look for both here to support upgrades.
|
||||
if [[ -z "$ip" ]]; then
|
||||
ip="$floating_ip_address"
|
||||
fi
|
||||
resource_save cinder cinder_server_ip $ip
|
||||
# Add a floating IP.
|
||||
eval $(openstack floating ip create public -f shell -c id -c floating_ip_address)
|
||||
resource_save cinder cinder_server_ip $floating_ip_address
|
||||
resource_save cinder cinder_server_float $id
|
||||
openstack server add floating ip $CINDER_SERVER $ip
|
||||
openstack server add floating ip $CINDER_SERVER $floating_ip_address
|
||||
|
||||
# Create a second (not bootable) volume to test attach/detach
|
||||
eval $(openstack volume create --size 1 $CINDER_VOL2 -f shell)
|
||||
@@ -177,14 +170,14 @@ function create {
|
||||
_wait_for_volume_update $CINDER_VOL3 "status" "in-use"
|
||||
|
||||
# ping check on the way up so we can add ssh content
|
||||
ping_check_public $ip 60
|
||||
ping_check_public $floating_ip_address 60
|
||||
|
||||
# turn of errexit for this portion of the retry
|
||||
set +o errexit
|
||||
local timeleft=60
|
||||
while [[ $timeleft -gt 0 ]]; do
|
||||
local start=$(date +%s)
|
||||
timeout 30 $FSSH -i $CINDER_KEY_FILE cirros@$ip \
|
||||
timeout 30 $FSSH -i $CINDER_KEY_FILE cirros@$floating_ip_address \
|
||||
"echo '$CINDER_STATE' > $CINDER_STATE_FILE"
|
||||
local rc=$?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user