1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #1224: the snapshot create method doesn't need snapshot_id

This commit is contained in:
Jaime Melis 2013-02-26 19:18:30 +01:00
parent 4296c5e61d
commit 43398673ab
2 changed files with 4 additions and 5 deletions

View File

@ -30,12 +30,11 @@ $: << File.dirname(__FILE__)
require 'vmware_driver'
deploy_id = ARGV[0]
snapshot_id = ARGV[1]
host = ARGV[3]
vmware_drv = VMwareDriver.new(host)
hypervisor_id = vmware_drv.snapshot_create(deploy_id, snapshot_id)
hypervisor_id = vmware_drv.snapshot_create(deploy_id)
puts hypervisor_id
exit 0

View File

@ -265,9 +265,9 @@ class VMwareDriver
# ------------------------------------------------------------------------ #
# Creates a new system snapshot #
# ------------------------------------------------------------------------ #
def snapshot_create(deploy_id, snapshot_id = nil)
def snapshot_create(deploy_id)
rc, info = do_action(
"virsh -c #{@uri} snapshot-create-as #{deploy_id} #{snapshot_id}")
"virsh -c #{@uri} snapshot-create-as #{deploy_id}")
exit info if rc == false
@ -291,7 +291,7 @@ class VMwareDriver
# ------------------------------------------------------------------------ #
def snapshot_revert(deploy_id, snapshot_id)
action = "virsh -c #{@uri} snapshot-revert " <<
"--force #{deploy_id} #{snapshot_id}")
"--force #{deploy_id} #{snapshot_id}"
rc, info = do_action(action)