Sha256: 07edb5ea49809fda46003c0b4b6e9d0639b0cfbb73b63c24de347f65aea71cdc
Contents?: true
Size: 622 Bytes
Versions: 21
Compression:
Stored size: 622 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 = service.list_hosts.body['hosts'] load(data) end def get(host_name) if host = service.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
21 entries across 21 versions & 4 rubygems