Class: Fog::Rackspace::Databases::Instances

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/databases/instances.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/rackspace/models/databases/instances.rb', line 10

def all
  data = service.list_instances.body['instances']
  load(data)
end

#get(instance_id) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/rackspace/models/databases/instances.rb', line 15

def get(instance_id)
  data = service.get_instance(instance_id).body['instance']
  new(data)
rescue Fog::Rackspace::Databases::NotFound
  nil
end