Sha256: e8e3b43d1b3ac0deb8ebdcfb5744352157d6b78747e82024366677586a629deb

Contents?: true

Size: 573 Bytes

Versions: 34

Compression:

Stored size: 573 Bytes

Contents

module OVIRT
  class Host < BaseObject
    attr_reader :description, :status, :cluster, :address

    def initialize(client, xml)
      super(client, xml[:id], xml[:href], (xml/'name').first.text)
      parse_xml_attributes!(xml)
      self
    end

    private

    def parse_xml_attributes!(xml)
      @description = ((xml/'description').first.text rescue nil)
      @address = ((xml/'address').first.text rescue nil)
      @status = (xml/'status').first.text
      @cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href])
    end
  end
end

Version data entries

34 entries across 32 versions & 2 rubygems

Version Path
rbovirt-0.1.7 lib/ovirt/host.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rbovirt-0.1.6/lib/ovirt/host.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rbovirt-0.1.6/lib/ovirt/host.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rbovirt-0.1.6/lib/ovirt/host.rb
rbovirt-0.1.6 lib/ovirt/host.rb
rbovirt-0.1.5 lib/ovirt/host.rb
rbovirt-0.1.4 lib/ovirt/host.rb
rbovirt-0.1.3 lib/ovirt/host.rb
rbovirt-0.1.2 lib/ovirt/host.rb
rbovirt-0.0.38 lib/ovirt/host.rb
rbovirt-0.1.1 lib/ovirt/host.rb
rbovirt-0.0.37 lib/ovirt/host.rb
rbovirt-0.0.36 lib/ovirt/host.rb
rbovirt-0.1.0 lib/ovirt/host.rb
rbovirt-0.0.35 lib/ovirt/host.rb
rbovirt-0.0.34 lib/ovirt/host.rb
rbovirt-0.0.33 lib/ovirt/host.rb
rbovirt-0.0.32 lib/ovirt/host.rb
rbovirt-0.0.31 lib/ovirt/host.rb
rbovirt-0.0.30 lib/ovirt/host.rb