Sha256: 9fec2db5745ef57d3efa75d83dd9633d84370041729f1a7d28a1fc5e03a9c739
Contents?: true
Size: 632 Bytes
Versions: 13
Compression:
Stored size: 632 Bytes
Contents
require 'fog/core/collection' require 'fog/openstack/models/compute/host' module Fog module Compute class OpenStack class Hosts < Fog::Collection model Fog::Compute::OpenStack::Host def all data = connection.list_hosts.body['hosts'] load(data) end def get(host_name) if host = connection.get_host_details(host_name).body['host'] new({ 'host_name' => host_name, 'details' => host} ) end rescue Fog::Compute::OpenStack::NotFound nil end end end end end
Version data entries
13 entries across 13 versions & 7 rubygems