class Fog::Compute::Vsphere::Hosts

Public Instance Methods

all(filters = {}) click to toggle source
# File lib/fog/vsphere/models/compute/hosts.rb, line 10
def all(filters = {})
  requires :datacenter, :cluster
  load service.list_hosts(:datacenter => datacenter, :cluster => cluster)
end
get(name) click to toggle source
# File lib/fog/vsphere/models/compute/hosts.rb, line 15
def get(name)
  all.find { |host| host.name == name } or
    raise Fog::Compute::Vsphere::NotFound, "no such host #{name}"
end