Class: Fog::Compute::Ecloud::Rnats

Inherits:
Ecloud::Collection show all
Defined in:
lib/fog/ecloud/models/compute/rnats.rb

Instance Method Summary collapse

Methods inherited from Ecloud::Collection

#check_href!, #load

Instance Method Details

#allObject



11
12
13
14
# File 'lib/fog/ecloud/models/compute/rnats.rb', line 11

def all
  data = service.get_rnats(href).body[:Rnats][:Rnat]
  load(data)
end

#get(uri) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/fog/ecloud/models/compute/rnats.rb', line 16

def get(uri)
  if data = service.get_rnat(uri)
    new(data.body)
  end
rescue Fog::Errors::NotFound
  nil
end