Class Fission::Action::VM::Stopper
In: lib/fission/action/vm/stopper.rb
Parent: Object

Methods

new   stop  

Public Class methods

Internal: Creates a new VMStopper object. This accepts a VM object.

vm - An instance of VM

Examples:

  Fission::Action::VMStopper.new @my_vm

Returns a new VMStopper object

Public Instance methods

Public: Stops a VM. The VM must be running in order to stop it.

options - Hash of options:

          :hard - Boolean which specifies to power off the VM (instead
                  of attempting to initiate a graceful shutdown). This
                  is the equivalent of passing 'hard' to the vmrun
                  stop command.
                  (default: false)

Examples

  @stopper.stop

  @stopper.stop :hard => true

Returns a Response with the result. If successful, the Response‘s data attribute will be nil. If there is an error, an unsuccessful Response will be returned.

[Validate]