Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::Vmfusion::Servers

Public Instance Methods

all(filter = nil) click to toggle source
# File lib/fog/vmfusion/models/compute/servers.rb, line 12
def all(filter = nil)

  data = []

  states = ::Fission::VM.all_with_status.data

  filter = {} if filter.nil?
  unless filter.has_key?(:name)
    vms=::Fission::VM.all.data
    vms.each do |vm|
      data << { :raw =>  { :fission => vm,
                           :state   => states[vm.name] } }
    end
  else
    data << { :raw => { :fission => ::Fission::VM.new(filter[:name]),
                        :state   => states[filter[:name]] } }
  end

  load(data)

end
get(name) click to toggle source
# File lib/fog/vmfusion/models/compute/servers.rb, line 34
def get(name)
  self.all(:name => name).first
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.