Permalink
Browse files

changed uuid to id

  • Loading branch information...
1 parent d778223 commit f26b169779681b8a7fd1b76eadc29a140810354e @avokhmin committed Oct 25, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/sahara/session.rb
View
@@ -52,7 +52,7 @@ def self.on(selection, vagrant_env = nil)
if is_snapshot_mode_on?(boxname)
puts "[#{boxname}] - snapshot mode is already on"
else
- instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"
+ instance_uuid="#{@vagrant_env.vms[boxname.to_sym].id}"
#Creating a snapshot
puts "[#{boxname}] - Enabling sandbox"
@@ -72,7 +72,7 @@ def self.commit(selection, vagrant_env = nil)
if !is_snapshot_mode_on?(boxname)
puts "[#{boxname}] - this requires that sandbox mode is on."
else
- instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"
+ instance_uuid="#{@vagrant_env.vms[boxname.to_sym].id}"
#Discard snapshot so current state is the latest state
puts "[#{boxname}] - unwinding sandbox"
@@ -97,7 +97,7 @@ def self.rollback(selection, vagrant_env = nil)
if !is_snapshot_mode_on?(boxname)
puts "[#{boxname}] - this requires that sandbox mode is on."
else
- instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"
+ instance_uuid="#{@vagrant_env.vms[boxname.to_sym].id}"
puts "[#{boxname}] - powering off machine"
@@ -147,7 +147,7 @@ def self.off(selection, vagrant_env = nil)
on_selected_vms(selection) do |boxname|
- instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"
+ instance_uuid="#{@vagrant_env.vms[boxname.to_sym].id}"
if !is_snapshot_mode_on?(boxname)
puts "[#{boxname}] - this requires that sandbox mode is on."
@@ -175,13 +175,13 @@ def self.is_vm_created?(boxname)
puts "[#{boxname}] - Box name doesn't exist in the Vagrantfile"
return false
else
- return !@vagrant_env.vms[boxname.to_sym].uuid.nil?
+ return !@vagrant_env.vms[boxname.to_sym].id.nil?
end
end
def self.list_snapshots(boxname)
- instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"
+ instance_uuid="#{@vagrant_env.vms[boxname.to_sym].id}"
snapshotlist=Array.new
output=execute("#{@vboxcmd} showvminfo --machinereadable \"#{instance_uuid}\"").join
snapshotresult=output.scan(/SnapshotName.*=(.*)/).flatten

0 comments on commit f26b169

Please sign in to comment.