correct usage of common functions 91/27891/1
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Thu, 2 Feb 2017 11:28:43 +0000 (11:28 +0000)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Thu, 2 Feb 2017 11:28:43 +0000 (11:28 +0000)
Change-Id: I5c486c5f08880f6b3b6b4b393360752fb6077bed
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
tests/lib/inspector
tests/lib/installer
tests/lib/installers/apex
tests/lib/installers/fuel

index 963e951..2422164 100644 (file)
@@ -26,7 +26,7 @@ function cleanup_inspector {
 
 
 if ! is_inspector_supported $INSPECTOR_TYPE; then
-    die $LINENO"INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported."
+    die $LINENO "INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported."
 fi
 
 source $TOP_DIR/lib/inspectors/$INSPECTOR_TYPE
index 807023f..bdee914 100644 (file)
@@ -29,7 +29,7 @@ function cleanup_installer {
 
 
 if ! is_installer_supported $INSTALLER_TYPE; then
-    die $LINENO"INSTALLER_TYPE=$INSTALLER_TYPE is not supported."
+    die $LINENO "INSTALLER_TYPE=$INSTALLER_TYPE is not supported."
 fi
 
 source $TOP_DIR/lib/installers/$INSTALLER_TYPE
index 54b3dce..45a5dcd 100644 (file)
@@ -3,7 +3,7 @@
 function get_installer_ip {
     local instack_mac=$(sudo virsh domiflist instack | awk '/default/{print $5}')
     INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk '{print $1}')
-    die_if_not_set $LINENO $INSTALLER_IP "No installer IP"
+    die_if_not_set $LINENO INSTALLER_IP "No installer IP"
 }
 
 function installer_get_ssh_keys {
index 31fe1fb..9ff9e72 100644 (file)
@@ -7,9 +7,10 @@ fi
 function get_installer_ip {
     ssh_opts_cpu="$ssh_opts -i instack_key"
     is_set INSTALLER_IP && return
-    local instack_mac=$(sudo virsh domiflist fuel-master | awk '/fuel1/{print $5}')
+    local instack_mac
+    instack_mac=$(sudo virsh domiflist fuel-master | awk '/fuel1/{print $5}')
     INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk '{print $1}')
-    die_if_not_set $LINENO $INSTALLER_IP "No installer IP"
+    die_if_not_set $LINENO INSTALLER_IP "No installer IP"
 }
 
 function get_controller_ips {
@@ -17,7 +18,7 @@ function get_controller_ips {
     get_installer_ip
     CONTROLLER_IPS=$(ssh $ssh_opts_cpu root@$INSTALLER_IP \
                      "fuel node | grep controller | cut -d '|' -f 5|xargs")
-    die_if_not_set $LINENO $CONTROLLER_IPS "No controller IPs"
+    die_if_not_set $LINENO CONTROLLER_IPS "No controller IPs"
 }
 
 function installer_get_ssh_keys {