Fix tools/xen/functions for bashate errors
Change I205d675ff231c0403dd135eacc8d57b45317859f modified the matching
for bashate and it has started running on this file, whereas before it
wasn't. This fixes the errors it is now picking up.
Change-Id: I7876b5c94d90f15e3b0228999c0750bfbebcaa1c
diff --git a/tools/xen/functions b/tools/xen/functions
index ab0be84..4317796 100644
--- a/tools/xen/functions
+++ b/tools/xen/functions
@@ -93,7 +93,7 @@
echo $pbd_path
}
-function find_ip_by_name() {
+function find_ip_by_name {
local guest_name="$1"
local interface="$2"
@@ -121,7 +121,7 @@
done
}
-function _vm_uuid() {
+function _vm_uuid {
local vm_name_label
vm_name_label="$1"
@@ -129,14 +129,14 @@
xe vm-list name-label="$vm_name_label" --minimal
}
-function _create_new_network() {
+function _create_new_network {
local name_label
name_label=$1
xe network-create name-label="$name_label"
}
-function _multiple_networks_with_name() {
+function _multiple_networks_with_name {
local name_label
name_label=$1
@@ -144,21 +144,21 @@
xe network-list name-label="$name_label" --minimal | grep -q ","
}
-function _network_exists() {
+function _network_exists {
local name_label
name_label=$1
! [ -z "$(xe network-list name-label="$name_label" --minimal)" ]
}
-function _bridge_exists() {
+function _bridge_exists {
local bridge
bridge=$1
! [ -z "$(xe network-list bridge="$bridge" --minimal)" ]
}
-function _network_uuid() {
+function _network_uuid {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -169,7 +169,7 @@
fi
}
-function add_interface() {
+function add_interface {
local vm_name_label
local bridge_or_network_name
@@ -185,7 +185,7 @@
xe vif-create network-uuid=$net vm-uuid=$vm device=$device_number
}
-function setup_network() {
+function setup_network {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -204,7 +204,7 @@
fi
}
-function bridge_for() {
+function bridge_for {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -215,29 +215,28 @@
fi
}
-function xenapi_ip_on() {
+function xenapi_ip_on {
local bridge_or_net_name
bridge_or_net_name=$1
ifconfig $(bridge_for "$bridge_or_net_name") | grep "inet addr" | cut -d ":" -f2 | sed "s/ .*//"
}
-function xenapi_is_listening_on() {
+function xenapi_is_listening_on {
local bridge_or_net_name
bridge_or_net_name=$1
! [ -z $(xenapi_ip_on "$bridge_or_net_name") ]
}
-function parameter_is_specified() {
+function parameter_is_specified {
local parameter_name
parameter_name=$1
compgen -v | grep "$parameter_name"
}
-function append_kernel_cmdline()
-{
+function append_kernel_cmdline {
local vm_name_label
local kernel_args
@@ -252,8 +251,7 @@
xe vm-param-set PV-args="$pv_args $kernel_args" uuid=$vm
}
-function destroy_all_vifs_of()
-{
+function destroy_all_vifs_of {
local vm_name_label
vm_name_label="$1"
@@ -268,11 +266,11 @@
unset IFS
}
-function have_multiple_hosts() {
+function have_multiple_hosts {
xe host-list --minimal | grep -q ","
}
-function attach_network() {
+function attach_network {
local bridge_or_net_name
bridge_or_net_name="$1"
@@ -286,7 +284,7 @@
xe network-attach uuid=$net host-uuid=$host
}
-function set_vm_memory() {
+function set_vm_memory {
local vm_name_label
local memory
@@ -305,7 +303,7 @@
uuid=$vm
}
-function max_vcpus() {
+function max_vcpus {
local vm_name_label
vm_name_label="$1"
@@ -337,7 +335,7 @@
xe vm-param-set uuid=$vm VCPUs-at-startup=$cpu_count
}
-function get_domid() {
+function get_domid {
local vm_name_label
vm_name_label="$1"