Class: Fog::Compute::Gridscale::Ips

Inherits:
PagingCollection show all
Defined in:
lib/fog/compute/gridscale/models/ips.rb

Instance Method Summary collapse

Methods inherited from PagingCollection

#next_page, #previous_page

Instance Method Details

#all(filters = {}) ⇒ Object



9
10
11
12
13
# File 'lib/fog/compute/gridscale/models/ips.rb', line 9

def all(filters={})
  data = service.ips_get(filters)
  ips = data.body["ips"].values
  load(ips)
end

#get(object_uuid) ⇒ Object



16
17
18
19
20
21
# File 'lib/fog/compute/gridscale/models/ips.rb', line 16

def get(object_uuid)
  ip = service.ip_get(object_uuid).body['ip']
  new(ip) if ip
rescue Fog::Errors::NotFound
  nil
end