Class: Fog::Metering::OpenStack::Resources

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/openstack/models/metering/resources.rb

Instance Method Summary collapse

Instance Method Details

#all(detailed = true) ⇒ Object



10
11
12
# File 'lib/fog/openstack/models/metering/resources.rb', line 10

def all(detailed=true)
  load(service.list_resources.body)
end

#find_by_id(resource_id) ⇒ Object



14
15
16
17
18
19
# File 'lib/fog/openstack/models/metering/resources.rb', line 14

def find_by_id(resource_id)
  resource = service.get_resource(resource_id).body
  new(resource)
rescue Fog::Metering::OpenStack::NotFound
  nil
end