1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/models/networking/networks.rb
2014-10-27 12:00:03 -04:00

23 lines
501 B
Ruby

require 'fog/rackspace/models/compute_v2/network'
module Fog
module Rackspace
class Networking
class Networks < Fog::Collection
model Fog::Rackspace::Networking::Network
def all
data = service.list_networks.body['networks']
load(data)
end
def get(id)
data = service.get_network(id).body['network']
new(data)
rescue Fog::Rackspace::Networking::NotFound
nil
end
end
end
end
end