Class: Fog::Compute::Gridscale::Networks

Inherits:
PagingCollection show all
Defined in:
lib/fog/compute/gridscale/models/networks.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/networks.rb', line 9

def all(filters={})
  data = service.networks_get(filters)
  droplets = data.body["networks"].values
  load(droplets)
end

#get(object_uuid) ⇒ Object



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

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