class Fog::Libvirt::Compute::Network

Public Class Methods

new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/libvirt/models/compute/network.rb, line 15
def initialize(attributes = {})
  super
end

Public Instance Methods

dhcp_leases(mac, flags = 0) click to toggle source
# File lib/fog/libvirt/models/compute/network.rb, line 19
def dhcp_leases(mac, flags = 0)
  service.dhcp_leases(uuid, mac, flags)
end
save() click to toggle source
# File lib/fog/libvirt/models/compute/network.rb, line 23
def save
  raise Fog::Errors::Error.new('Creating a new network is not yet implemented. Contributions welcome!')
end
shutdown() click to toggle source
# File lib/fog/libvirt/models/compute/network.rb, line 27
def shutdown
  service.destroy_network(uuid)
end
to_xml() click to toggle source
# File lib/fog/libvirt/models/compute/network.rb, line 31
def to_xml
  builder = Nokogiri::XML::Builder.new do |xml|
    xml.network do
      xml.name(name)
      xml.bridge(:name => bridge_name, :stp => 'on', :delay => '0')
    end
  end

  builder.to_xml
end