Sha256: 5607a61d085d6b11e34ea3bd35c75e42f086732e883318d5cc96d4b419ce25f9

Contents?: true

Size: 710 Bytes

Versions: 8

Compression:

Stored size: 710 Bytes

Contents

require 'fog/core/model'
require 'fog/libvirt/models/compute/util/util'

module Fog
  module Compute
    class Libvirt
      class Network < Fog::Model
        include Fog::Compute::LibvirtUtil

        identity :uuid
        attribute :name
        attribute :bridge_name
        attribute :xml

        def initialize(attributes = {})
          super
        end

        def dhcp_leases(mac, flags = 0)
          service.dhcp_leases(uuid, mac, flags)
        end

        def save
          raise Fog::Errors::Error.new('Creating a new network is not yet implemented. Contributions welcome!')
        end

        def shutdown
          service.destroy_network(uuid)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-libvirt-0.5.0 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.4.2 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.4.1 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.4.0 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.3.0 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.2.0 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.1.0 lib/fog/libvirt/models/compute/network.rb
fog-libvirt-0.0.4 lib/fog/libvirt/models/compute/network.rb