2011-06-28 15:47:16 +02:00
|
|
|
require 'fog/core/model'
|
2012-04-04 15:03:17 +03:00
|
|
|
require 'fog/libvirt/models/compute/util/util'
|
2011-06-28 15:47:16 +02:00
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Libvirt
|
|
|
|
|
|
|
|
class Network < Fog::Model
|
|
|
|
|
|
|
|
include Fog::Compute::LibvirtUtil
|
|
|
|
|
2011-08-03 12:48:44 +02:00
|
|
|
identity :uuid
|
2011-06-28 15:47:16 +02:00
|
|
|
attribute :name
|
|
|
|
attribute :bridge_name
|
2011-09-12 20:11:58 +02:00
|
|
|
attribute :xml
|
2011-08-08 15:22:55 -06:00
|
|
|
|
2011-06-28 15:47:16 +02:00
|
|
|
def initialize(attributes = {})
|
2011-08-03 12:48:44 +02:00
|
|
|
super
|
|
|
|
end
|
2011-08-08 15:22:55 -06:00
|
|
|
|
2011-08-03 12:48:44 +02:00
|
|
|
def save
|
2011-08-08 15:30:09 -06:00
|
|
|
raise Fog::Errors::Error.new('Creating a new network is not yet implemented. Contributions welcome!')
|
2011-06-28 15:47:16 +02:00
|
|
|
end
|
2011-08-08 15:22:55 -06:00
|
|
|
|
2012-04-04 15:03:17 +03:00
|
|
|
def shutdown
|
|
|
|
connection.destroy_network(uuid)
|
2011-06-28 15:47:16 +02:00
|
|
|
end
|
2011-08-08 15:22:55 -06:00
|
|
|
|
2011-06-28 15:47:16 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|