Sha256: 1840ce8acf08f5ac9eac39b045ce80abd04964f5efda4d221c4095f9febb5c87
Contents?: true
Size: 536 Bytes
Versions: 33
Compression:
Stored size: 536 Bytes
Contents
module Fog module Compute class Vsphere class Hosts < Fog::Collection attribute :datacenter attribute :cluster model Fog::Compute::Vsphere::Host def all(filters = {}) requires :datacenter, :cluster load service.list_hosts(:datacenter => datacenter, :cluster => cluster) end def get(name) all.find { |host| host.name == name } or raise Fog::Compute::Vsphere::NotFound, "no such host #{name}" end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems