class Fission::Action::VM::Lister
def all
empty Array.
objects. If no VMs are found, the Response's data attribute will be an
If successful, the Response's data attribute will be an Array of VM
Returns a Response with the result.
# => [
Fission::VM.all.data
Examples
Public: Provides all of the VMs which are located in the VM directory.
def all vm_dirs = Dir[File.join Fission.config['vm_dir'], '*.vmwarevm'].select do |d| File.directory? d end response = Response.new :code => 0 response.data = vm_dirs.collect do |dir| Fission::VM.new(File.basename dir, '.vmwarevm') end response end