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/opennebula/models/compute/networks.rb
Andrew Brown 83ed0422d1 Adding Tests and Mocks
Adding several test cases for flavors and updating network tests to
support new attributes.
2014-11-13 15:32:34 -05:00

25 lines
485 B
Ruby

require 'fog/core/collection'
require 'fog/opennebula/models/compute/network'
module Fog
module Compute
class OpenNebula
class Networks < Fog::Collection
model Fog::Compute::OpenNebula::Network
def all(filter={})
self.get_by_filter(filter)
end
def get(id)
self.all({:id => id}).first
end
def get_by_filter(filter)
load(service.list_networks(filter))
end
end
end
end
end