Merge "Minor fixes for bashate trunk"
This commit is contained in:
commit
c3c91c4267
13
functions
13
functions
@ -94,12 +94,14 @@ function upload_image {
|
||||
local path_len
|
||||
|
||||
# vmdk adapter type
|
||||
local vmdk_adapter_type="$(head -25 $image | { grep -a -F -m 1 'ddb.adapterType =' $image || true; })"
|
||||
local vmdk_adapter_type
|
||||
vmdk_adapter_type="$(head -25 $image | { grep -a -F -m 1 'ddb.adapterType =' $image || true; })"
|
||||
vmdk_adapter_type="${vmdk_adapter_type#*\"}"
|
||||
vmdk_adapter_type="${vmdk_adapter_type%?}"
|
||||
|
||||
# vmdk disk type
|
||||
local vmdk_create_type="$(head -25 $image | { grep -a -F -m 1 'createType=' $image || true; })"
|
||||
local vmdk_create_type
|
||||
vmdk_create_type="$(head -25 $image | { grep -a -F -m 1 'createType=' $image || true; })"
|
||||
vmdk_create_type="${vmdk_create_type#*\"}"
|
||||
vmdk_create_type="${vmdk_create_type%\"*}"
|
||||
|
||||
@ -109,7 +111,8 @@ function upload_image {
|
||||
vmdk_disktype="sparse"
|
||||
elif [[ "$vmdk_create_type" = "monolithicFlat" || "$vmdk_create_type" = "vmfs" ]]; then
|
||||
# Attempt to retrieve the ``*-flat.vmdk``
|
||||
local flat_fname="$(head -25 $image | { grep -G 'RW\|RDONLY [0-9]+ FLAT\|VMFS' $image || true; })"
|
||||
local flat_fname
|
||||
flat_fname="$(head -25 $image | { grep -G 'RW\|RDONLY [0-9]+ FLAT\|VMFS' $image || true; })"
|
||||
flat_fname="${flat_fname#*\"}"
|
||||
flat_fname="${flat_fname%?}"
|
||||
if [[ -z "$flat_fname" ]]; then
|
||||
@ -407,8 +410,10 @@ function ping_check {
|
||||
function get_instance_ip {
|
||||
local vm_id=$1
|
||||
local network_name=$2
|
||||
local nova_result="$(nova show $vm_id)"
|
||||
local nova_result
|
||||
local ip
|
||||
|
||||
nova_result="$(nova show $vm_id)"
|
||||
ip=$(echo "$nova_result" | grep "$network_name" | get_field 2)
|
||||
if [[ $ip = "" ]];then
|
||||
echo "$nova_result"
|
||||
|
@ -1213,7 +1213,7 @@ function get_plugin_packages {
|
||||
local files_to_parse=""
|
||||
local package_dir=""
|
||||
for plugin in ${DEVSTACK_PLUGINS//,/ }; do
|
||||
local package_dir="$(_get_package_dir ${GITDIR[$plugin]}/devstack/files)"
|
||||
package_dir="$(_get_package_dir ${GITDIR[$plugin]}/devstack/files)"
|
||||
files_to_parse+=" $package_dir/$plugin"
|
||||
done
|
||||
echo "$(_parse_package_files $files_to_parse)"
|
||||
|
@ -30,7 +30,8 @@ function iniadd {
|
||||
local option=$3
|
||||
shift 3
|
||||
|
||||
local values="$(iniget_multiline $file $section $option) $@"
|
||||
local values
|
||||
values="$(iniget_multiline $file $section $option) $@"
|
||||
iniset_multiline $sudo $file $section $option $values
|
||||
$xtrace
|
||||
}
|
||||
|
@ -713,9 +713,12 @@ function install_neutron_agent_packages {
|
||||
|
||||
# Start running processes, including screen
|
||||
function start_neutron_service_and_check {
|
||||
local cfg_file_options="$(determine_config_files neutron-server)"
|
||||
local service_port=$Q_PORT
|
||||
local service_protocol=$Q_PROTOCOL
|
||||
local cfg_file_options
|
||||
|
||||
cfg_file_options="$(determine_config_files neutron-server)"
|
||||
|
||||
if is_service_enabled tls-proxy; then
|
||||
service_port=$Q_PORT_INT
|
||||
service_protocol="http"
|
||||
|
@ -23,9 +23,10 @@ function create_directory_for_kernels {
|
||||
if [ -d "/boot/guest" ]; then
|
||||
echo "INFO: /boot/guest directory already exists, using that" >&2
|
||||
else
|
||||
local LOCALPATH="$(get_local_sr_path)/os-guest-kernels"
|
||||
mkdir -p $LOCALPATH
|
||||
ln -s $LOCALPATH /boot/guest
|
||||
local local_path
|
||||
local_path="$(get_local_sr_path)/os-guest-kernels"
|
||||
mkdir -p $local_path
|
||||
ln -s $local_path /boot/guest
|
||||
fi
|
||||
}
|
||||
|
||||
@ -33,9 +34,10 @@ function create_directory_for_images {
|
||||
if [ -d "/images" ]; then
|
||||
echo "INFO: /images directory already exists, using that" >&2
|
||||
else
|
||||
local LOCALPATH="$(get_local_sr_path)/os-images"
|
||||
mkdir -p $LOCALPATH
|
||||
ln -s $LOCALPATH /images
|
||||
local local_path
|
||||
local_path="$(get_local_sr_path)/os-images"
|
||||
mkdir -p $local_path
|
||||
ln -s $local_path /images
|
||||
fi
|
||||
}
|
||||
|
||||
@ -73,7 +75,7 @@ function find_ip_by_name {
|
||||
|
||||
if [ -z "$ipaddress" ]; then
|
||||
sleep $period
|
||||
((i++))
|
||||
i=$((i+1))
|
||||
else
|
||||
echo $ipaddress
|
||||
break
|
||||
|
3
tox.ini
3
tox.ini
@ -8,6 +8,9 @@ usedevelop = False
|
||||
install_command = pip install {opts} {packages}
|
||||
|
||||
[testenv:bashate]
|
||||
# if you want to test out some changes you have made to bashate
|
||||
# against devstack, just set BASHATE_INSTALL_PATH=/path/... to your
|
||||
# modified bashate tree
|
||||
deps =
|
||||
{env:BASHATE_INSTALL_PATH:bashate==0.4.0}
|
||||
whitelist_externals = bash
|
||||
|
Loading…
Reference in New Issue
Block a user