Class | Fission::Action::VM::Lister |
In: |
lib/fission/action/vm/lister.rb
|
Parent: | Object |
Public: Provides all of the VMs which are located in the VM directory.
Examples
Fission::VM.all.data # => [<Fission::VM:0x007fd6fa24c5d8 @name="foo">, <Fission::VM:0x007fd6fa23c5e8 @name="bar">]
Returns a Response with the result. If successful, the Response‘s data attribute will be an Array of VM objects. If no VMs are found, the Response‘s data attribute will be an empty Array. If there is an error, an unsuccessful Response will be returned.
Public: Provides all of the VMs which are currently running.
Examples
Fission::VM.all_running.data # => [<Fission::VM:0x007fd6fa24c5d8 @name="foo">, <Fission::VM:0x007fd6fa23c5e8 @name="bar">]
Returns a Response with the result. If successful, the Response‘s data attribute will be an Array of VM objects which are running. If no VMs are running, the Response‘s data attribute will be an empty Array. If there is an error, an unsuccessful Response will be returned.
Public: Provides a list of all of the VMs and their associated status
Examples
Fission::VM.all_with_status.data # => { 'vm1' => 'running', 'vm2' => 'suspended', 'vm3' => 'not running'}
Returns a Response with the result. If successful, the Response‘s data attribute will be a Hash of with the VM names as keys and their status as the values. If there is an error, an unsuccessful Repsonse will be returned.