mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #575: changed vmm remotes to use exec_and_log
This commit is contained in:
parent
5fa3006adf
commit
f41f12f190
@ -21,13 +21,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
|
||||
deploy_id=$1
|
||||
|
||||
virsh --connect $LIBVIRT_URI destroy $deploy_id
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not destroy $deploy_id"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI destroy $deploy_id" \
|
||||
"Could not destroy $deploy_id"
|
||||
|
@ -22,13 +22,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
deploy_id=$1
|
||||
dest_host=$2
|
||||
|
||||
virsh --connect $LIBVIRT_URI migrate --live $deploy_id $QEMU_PROTOCOL://$dest_host/system
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not migrate $deploy_id to $dest_host"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI migrate --live $deploy_id $QEMU_PROTOCOL://$dest_host/system" \
|
||||
"Could not migrate $deploy_id to $dest_host"
|
||||
|
@ -21,13 +21,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
|
||||
file=$1
|
||||
|
||||
virsh --connect $LIBVIRT_URI restore $file
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not restore from $file"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI restore $file" \
|
||||
"Could not restore from $file"
|
||||
|
@ -27,13 +27,5 @@ if [ ! -f $file ]; then
|
||||
chmod 666 $file
|
||||
fi
|
||||
|
||||
virsh --connect $LIBVIRT_URI save $deploy_id $file
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not save $deploy_id to $file"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI save $deploy_id $file" \
|
||||
"Could not save $deploy_id to $file"
|
||||
|
@ -21,13 +21,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
|
||||
deploy_id=$1
|
||||
|
||||
$XM_CANCEL $deploy_id
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not destroy $deploy_id"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "$XM_CANCEL $deploy_id" \
|
||||
"Could not destroy $deploy_id"
|
||||
|
@ -22,13 +22,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
deploy_id=$1
|
||||
dest_host=$2
|
||||
|
||||
$XM_MIGRATE $deploy_id $dest_host
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not migrate $deploy_id to $dest_host"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "$XM_MIGRATE $deploy_id $dest_host" \
|
||||
"Could not migrate $deploy_id to $dest_host"
|
||||
|
@ -21,14 +21,6 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
|
||||
file=$1
|
||||
|
||||
$XM_RESTORE $file
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not restore from $file"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "$XM_RESTORE $file" \
|
||||
"Could not restore from $file"
|
||||
|
||||
|
@ -22,13 +22,5 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
deploy_id=$1
|
||||
file=$2
|
||||
|
||||
$XM_SAVE $deploy_id $file
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not save $deploy_id to $file"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "$XM_SAVE $deploy_id $file" \
|
||||
"Could not save $deploy_id to $file"
|
||||
|
@ -25,16 +25,8 @@ function gdm {
|
||||
$XM_LIST | grep "$deploy_id "
|
||||
}
|
||||
|
||||
$XM_SHUTDOWN $deploy_id
|
||||
|
||||
error_code=$?
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
exit $error_code
|
||||
else
|
||||
error_message "Could not shutdown $deploy_id"
|
||||
exit $error_code
|
||||
fi
|
||||
exec_and_log "$XM_SHUTDOWN $deploy_id" \
|
||||
"Could not shutdown $deploy_id"
|
||||
|
||||
OUT=$(gdm)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user