Class: VagrantPlugins::Utm::CommandDisposable

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_utm/commands/disposable.rb

Overview

Run VM as a snapshot and do not save changes to disk.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



7
8
9
# File 'lib/vagrant_utm/commands/disposable.rb', line 7

def self.synopsis
  "UTM: boots machine in UTM disposable mode"
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/vagrant_utm/commands/disposable.rb', line 11

def execute
  opts = OptionParser.new do |o|
    o.banner = "Usage: vagrant disposable [name|id]"
  end

  # Parse the options
  argv = parse_options(opts)
  return unless argv

  with_target_vms do |machine|
    machine.action(:start_disposable)
  end

  # Success, exit status 0
  0
end