2011-06-28 09:47:16 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Libvirt
|
|
|
|
|
|
|
|
class Interface < Fog::Model
|
|
|
|
|
2011-08-03 06:48:44 -04:00
|
|
|
identity :name
|
2011-06-28 09:47:16 -04:00
|
|
|
attribute :mac
|
2012-04-04 08:03:17 -04:00
|
|
|
attribute :active
|
2011-06-28 09:47:16 -04:00
|
|
|
|
2011-08-03 06:48:44 -04:00
|
|
|
def save
|
2011-08-08 17:30:09 -04:00
|
|
|
raise Fog::Errors::Error.new('Creating a new interface is not yet implemented. Contributions welcome!')
|
2011-08-03 06:48:44 -04:00
|
|
|
end
|
2011-08-08 17:22:55 -04:00
|
|
|
|
2012-04-04 08:03:17 -04:00
|
|
|
def shutdown
|
2012-12-22 18:25:36 -05:00
|
|
|
service.destroy_interface(mac)
|
2011-06-28 09:47:16 -04:00
|
|
|
end
|
2011-08-08 17:22:55 -04:00
|
|
|
|
2012-04-04 08:03:17 -04:00
|
|
|
def active?
|
|
|
|
active
|
2011-06-28 09:47:16 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|