From cf3b1fa9237b6a3bd67211c6441a7a4929a572c0 Mon Sep 17 00:00:00 2001 From: utsav dusad Date: Sun, 3 May 2015 21:16:16 +0530 Subject: [PATCH] Rename Bash scripts Rename scripts in /labs/lib with proper naming convention. Bug #1451071 Change-Id: I3a1f096414866846a7f9572804c5db852d76a36e --- labs/lib/functions.guest | 2 +- labs/lib/{functions => functions.sh} | 0 labs/lib/osbash/{functions.host => functions-host.sh} | 2 +- labs/lib/osbash/{lib.color => lib-color.sh} | 0 labs/lib/osbash/{scanlib => scanlib.sh} | 0 .../{virtualbox.functions => virtualbox-functions.sh} | 2 +- ...tualbox.install_base => virtualbox-install_base.sh} | 0 ...albox.install_nodes => virtualbox-install_nodes.sh} | 0 .../wbatch/{batch_for_windows => batch_for_windows.sh} | 0 labs/osbash.sh | 10 +++++----- labs/tools/get_upstart_logs.sh | 2 +- labs/tools/repeat-test.sh | 2 +- labs/tools/restore-cluster.sh | 2 +- labs/tools/test-once.sh | 2 +- 14 files changed, 12 insertions(+), 12 deletions(-) rename labs/lib/{functions => functions.sh} (100%) rename labs/lib/osbash/{functions.host => functions-host.sh} (99%) rename labs/lib/osbash/{lib.color => lib-color.sh} (100%) rename labs/lib/osbash/{scanlib => scanlib.sh} (100%) rename labs/lib/osbash/{virtualbox.functions => virtualbox-functions.sh} (99%) rename labs/lib/osbash/{virtualbox.install_base => virtualbox-install_base.sh} (100%) rename labs/lib/osbash/{virtualbox.install_nodes => virtualbox-install_nodes.sh} (100%) rename labs/lib/wbatch/{batch_for_windows => batch_for_windows.sh} (100%) diff --git a/labs/lib/functions.guest b/labs/lib/functions.guest index 27dfbb8f..94b27376 100644 --- a/labs/lib/functions.guest +++ b/labs/lib/functions.guest @@ -2,7 +2,7 @@ # Sourcing this file calls functions fix_path_env and source_deploy. -source "$LIB_DIR/functions" +source "$LIB_DIR/functions.sh" source "$LIB_DIR/functions-common-devstack" # Make devstack's operating system identification work with nounset diff --git a/labs/lib/functions b/labs/lib/functions.sh similarity index 100% rename from labs/lib/functions rename to labs/lib/functions.sh diff --git a/labs/lib/osbash/functions.host b/labs/lib/osbash/functions-host.sh similarity index 99% rename from labs/lib/osbash/functions.host rename to labs/lib/osbash/functions-host.sh index 00806575..d7e6d905 100644 --- a/labs/lib/osbash/functions.host +++ b/labs/lib/osbash/functions-host.sh @@ -1,6 +1,6 @@ # This file contains bash functions that are used by osbash on the host. -source "$LIB_DIR/functions" +source "$LIB_DIR/functions.sh" #------------------------------------------------------------------------------- # Conditional execution diff --git a/labs/lib/osbash/lib.color b/labs/lib/osbash/lib-color.sh similarity index 100% rename from labs/lib/osbash/lib.color rename to labs/lib/osbash/lib-color.sh diff --git a/labs/lib/osbash/scanlib b/labs/lib/osbash/scanlib.sh similarity index 100% rename from labs/lib/osbash/scanlib rename to labs/lib/osbash/scanlib.sh diff --git a/labs/lib/osbash/virtualbox.functions b/labs/lib/osbash/virtualbox-functions.sh similarity index 99% rename from labs/lib/osbash/virtualbox.functions rename to labs/lib/osbash/virtualbox-functions.sh index abad5534..07b86060 100644 --- a/labs/lib/osbash/virtualbox.functions +++ b/labs/lib/osbash/virtualbox-functions.sh @@ -682,7 +682,7 @@ function vbox_sleep { # Booting a VM and passing boot parameters #------------------------------------------------------------------------------- -source "$OSBASH_LIB_DIR/scanlib" +source "$OSBASH_LIB_DIR/scanlib.sh" function _vbox_push_scancode { local vm_name=$1 diff --git a/labs/lib/osbash/virtualbox.install_base b/labs/lib/osbash/virtualbox-install_base.sh similarity index 100% rename from labs/lib/osbash/virtualbox.install_base rename to labs/lib/osbash/virtualbox-install_base.sh diff --git a/labs/lib/osbash/virtualbox.install_nodes b/labs/lib/osbash/virtualbox-install_nodes.sh similarity index 100% rename from labs/lib/osbash/virtualbox.install_nodes rename to labs/lib/osbash/virtualbox-install_nodes.sh diff --git a/labs/lib/wbatch/batch_for_windows b/labs/lib/wbatch/batch_for_windows.sh similarity index 100% rename from labs/lib/wbatch/batch_for_windows rename to labs/lib/wbatch/batch_for_windows.sh diff --git a/labs/osbash.sh b/labs/osbash.sh index b1255fa3..cad79e9f 100755 --- a/labs/osbash.sh +++ b/labs/osbash.sh @@ -16,10 +16,10 @@ source "$CONFIG_DIR/openstack" source "$CONFIG_DIR/deploy.osbash" source "$CONFIG_DIR/provider.virtualbox" source "$OSBASH_LIB_DIR/lib.$DISTRO" -source "$OSBASH_LIB_DIR/functions.host" -source "$OSBASH_LIB_DIR/virtualbox.functions" -source "$OSBASH_LIB_DIR/virtualbox.install_base" -source "$LIB_DIR/osbash/lib.color" +source "$OSBASH_LIB_DIR/functions-host.sh" +source "$OSBASH_LIB_DIR/virtualbox-functions.sh" +source "$OSBASH_LIB_DIR/virtualbox-install_base.sh" +source "$LIB_DIR/osbash/lib-color.sh" function usage { echo "Usage: $0 {-b|-w} [-g GUI] [--no-color] [-n] {TARGET}" @@ -220,7 +220,7 @@ MGMT_NET_IF=$(create_network "$MGMT_NET") DATA_NET_IF=$(create_network "$DATA_NET") API_NET_IF=$(create_network "$API_NET") #------------------------------------------------------------------------------- -source "$OSBASH_LIB_DIR/virtualbox.install_nodes" +source "$OSBASH_LIB_DIR/virtualbox-install_nodes.sh" vm_build_nodes "$CMD" #------------------------------------------------------------------------------- ENDTIME=$(date +%s) diff --git a/labs/tools/get_upstart_logs.sh b/labs/tools/get_upstart_logs.sh index 68a30200..26caac23 100755 --- a/labs/tools/get_upstart_logs.sh +++ b/labs/tools/get_upstart_logs.sh @@ -3,7 +3,7 @@ set -o errexit -o nounset TOP_DIR=$(cd "$(dirname "$0")/.." && pwd) source "$TOP_DIR/config/paths" source "$CONFIG_DIR/deploy.osbash" -source "$OSBASH_LIB_DIR/functions.host" +source "$OSBASH_LIB_DIR/functions-host.sh" CONTROLLER_PORT=2230 NETWORK_PORT=2231 diff --git a/labs/tools/repeat-test.sh b/labs/tools/repeat-test.sh index 1aa6595c..be7d9d29 100755 --- a/labs/tools/repeat-test.sh +++ b/labs/tools/repeat-test.sh @@ -3,7 +3,7 @@ set -o errexit -o nounset TOP_DIR=$(cd "$(dirname "$0")/.." && pwd) source "$TOP_DIR/config/paths" source "$CONFIG_DIR/deploy.osbash" -source "$OSBASH_LIB_DIR/functions.host" +source "$OSBASH_LIB_DIR/functions-host.sh" LOG_NAME=test.log RESULTS_ROOT=$LOG_DIR/test-results diff --git a/labs/tools/restore-cluster.sh b/labs/tools/restore-cluster.sh index be3bf4cc..d4309cc9 100755 --- a/labs/tools/restore-cluster.sh +++ b/labs/tools/restore-cluster.sh @@ -3,7 +3,7 @@ set -o errexit -o nounset TOP_DIR=$(cd "$(dirname "$0")/.." && pwd) source "$TOP_DIR/config/paths" source "$CONFIG_DIR/deploy.osbash" -source "$OSBASH_LIB_DIR/functions.host" +source "$OSBASH_LIB_DIR/functions-host.sh" CONTROLLER_VM=controller NETWORK_VM=network diff --git a/labs/tools/test-once.sh b/labs/tools/test-once.sh index 442bb66a..2d8ff6d3 100755 --- a/labs/tools/test-once.sh +++ b/labs/tools/test-once.sh @@ -3,7 +3,7 @@ set -o errexit -o nounset TOP_DIR=$(cd "$(dirname "$0")/.." && pwd) source "$TOP_DIR/config/paths" source "$CONFIG_DIR/deploy.osbash" -source "$OSBASH_LIB_DIR/functions.host" +source "$OSBASH_LIB_DIR/functions-host.sh" # Get remote ssh port of target node (VM_SSH_PORT) source "$CONFIG_DIR/config.controller"