From 4391225f7ea021fd3e11b9b0acb24c8fe0114bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 21 Feb 2013 15:21:31 +0100 Subject: [PATCH] Feature #1224: Minor edits --- include/RequestManagerVirtualMachine.h | 2 +- src/cli/onevm | 5 ++--- src/lcm/LifeCycleStates.cc | 7 ++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/RequestManagerVirtualMachine.h b/include/RequestManagerVirtualMachine.h index 4725510bc0..d740dff4fd 100644 --- a/include/RequestManagerVirtualMachine.h +++ b/include/RequestManagerVirtualMachine.h @@ -259,7 +259,7 @@ class VirtualMachineSnapshotDelete: public RequestManagerVirtualMachine public: VirtualMachineSnapshotDelete(): RequestManagerVirtualMachine("VirtualMachineSnapshotDelete", - "Deletes a virtual machine to a snapshot", + "Deletes a virtual machine snapshot", "A:sii"){}; ~VirtualMachineSnapshotDelete(){}; diff --git a/src/cli/onevm b/src/cli/onevm index 4bf0ce94ae..8a04748399 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -644,10 +644,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do Reverts a VM to a saved snapshot EOT - command :"snapshot-revert", snapshot_revert_desc, [:range,:vmid_list], - :snapshot_id do + command :"snapshot-revert", snapshot_revert_desc, :vmid, :snapshot_id do - helper.perform_actions(args[0],options,"snapshot reverted") do |o| + helper.perform_action(args[0],options,"snapshot reverted") do |o| o.snapshot_revert(args[1].to_i) end end diff --git a/src/lcm/LifeCycleStates.cc b/src/lcm/LifeCycleStates.cc index 0ae0863157..0e2c7734d9 100644 --- a/src/lcm/LifeCycleStates.cc +++ b/src/lcm/LifeCycleStates.cc @@ -1263,7 +1263,7 @@ void LifeCycleManager::snapshot_create_failure(int vid) if ( vm->get_lcm_state() == VirtualMachine::HOTPLUG ) { - vm->clear_active_snapshot(); + vm->delete_active_snapshot(); vm->set_state(VirtualMachine::RUNNING); @@ -1296,7 +1296,7 @@ void LifeCycleManager::snapshot_revert_success(int vid) if ( vm->get_lcm_state() == VirtualMachine::HOTPLUG ) { - vm->delete_active_snapshot(); + vm->clear_active_snapshot(); vm->set_state(VirtualMachine::RUNNING); @@ -1374,10 +1374,11 @@ void LifeCycleManager::snapshot_delete_failure(int vid) } else { - vm->log("LCM",Log::ERROR,"snapshot_delete_success, VM in a wrong state"); + vm->log("LCM",Log::ERROR,"snapshot_delete_failure, VM in a wrong state"); } vm->unlock(); } + /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */