Sha256: 896c46840a5c1afc0ecdbd113ca63f9470b2f09a4a212cee57c07286ada3a4e6
Contents?: true
Size: 532 Bytes
Versions: 7
Compression:
Stored size: 532 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 } || raise(Fog::Compute::Vsphere::NotFound, "no such host #{name}") end end end end end
Version data entries
7 entries across 5 versions & 2 rubygems