2011-06-28 15:47:16 +02:00
|
|
|
require 'fog/core/collection'
|
2011-08-29 10:24:39 -05:00
|
|
|
require 'fog/libvirt/models/compute/network'
|
2011-06-28 15:47:16 +02:00
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Libvirt
|
|
|
|
|
|
|
|
class Networks < Fog::Collection
|
|
|
|
|
|
|
|
model Fog::Compute::Libvirt::Network
|
|
|
|
|
2012-04-04 15:03:17 +03:00
|
|
|
def all(filter={})
|
2012-12-22 23:25:36 +00:00
|
|
|
load(service.list_networks(filter))
|
2011-06-28 15:47:16 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def get(uuid)
|
2011-08-03 12:48:44 +02:00
|
|
|
self.all(:uuid => uuid).first
|
|
|
|
end
|
2011-08-08 15:22:55 -06:00
|
|
|
|
2012-04-04 15:03:17 +03:00
|
|
|
end
|
2011-06-28 15:47:16 +02:00
|
|
|
|
2012-04-04 15:03:17 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|