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 } ||
    raise(Fog::Compute::Vsphere::NotFound, "no such host #{name}")
end