Sha256: 93744f675bb577c7b34d10f32ae120a7d0b31d9c0b24b3fe1a1fc6e1d2f3cc6d

Contents?: true

Size: 765 Bytes

Versions: 24

Compression:

Stored size: 765 Bytes

Contents

require 'fog/core/model'

module Fog
  module Compute
    class Libvirt

      class Interface < Fog::Model

        identity :name

        attribute :mac
        attribute :xml

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

        def destroy
          requires :raw
          raw.delete
          true
        end

        private

        def raw
          @raw
        end

        def raw=(new_raw)
          @raw = new_raw

          raw_attributes = {
            :name => new_raw.name,
            :mac => new_raw.mac,
            :xml => new_raw.xml_desc,
          }

          merge_attributes(raw_attributes)

        end

      end

    end
  end

end

Version data entries

24 entries across 24 versions & 6 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
fog-1.3.1 lib/fog/libvirt/models/compute/interface.rb
fog-1.3.0 lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
fog-1.2.0 lib/fog/libvirt/models/compute/interface.rb
ktheory-fog-1.1.2 lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
fog-1.1.2 lib/fog/libvirt/models/compute/interface.rb
fog_tractical-1.1.4 lib/fog/libvirt/models/compute/interface.rb
fog_tractical-1.1.3 lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb
fog-1.1.1 lib/fog/libvirt/models/compute/interface.rb
fog-1.1.0 lib/fog/libvirt/models/compute/interface.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/interface.rb