Sha256: 749d76bf54e01532f30f05094a7329e9a50cfa037a6de3bb804a0d7512740de7

Contents?: true

Size: 552 Bytes

Versions: 45

Compression:

Stored size: 552 Bytes

Contents

module OVIRT
 class Cluster < BaseObject
    attr_reader :description, :datacenter, :version

    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)
      @version = parse_version(xml)
      @datacenter = Link::new(@client, (xml/'data_center').first[:id], (xml/'data_center').first[:href]) unless (xml/'data_center').empty?
    end

  end
end

Version data entries

45 entries across 43 versions & 2 rubygems

Version Path
rbovirt-0.0.29 lib/ovirt/cluster.rb
rbovirt-0.0.28 lib/ovirt/cluster.rb
rbovirt-0.0.27 lib/ovirt/cluster.rb
rbovirt-0.0.26 lib/ovirt/cluster.rb
rbovirt-0.0.25 lib/ovirt/cluster.rb
rbovirt-0.0.24 lib/ovirt/cluster.rb
rbovirt-0.0.23 lib/ovirt/cluster.rb
rbovirt-0.0.22 lib/ovirt/cluster.rb
rbovirt-0.0.21 lib/ovirt/cluster.rb
rbovirt-0.0.20 lib/ovirt/cluster.rb
rbovirt-0.0.19 lib/ovirt/cluster.rb
rbovirt-0.0.18 lib/ovirt/cluster.rb
rbovirt-0.0.17 lib/ovirt/cluster.rb
rbovirt-0.0.16 lib/ovirt/cluster.rb
rbovirt-0.0.15 lib/ovirt/cluster.rb
rbovirt-0.0.14 lib/ovirt/cluster.rb
rbovirt-0.0.13 lib/ovirt/cluster.rb
rbovirt-0.0.12 lib/ovirt/cluster.rb
rbovirt-0.0.11 lib/ovirt/cluster.rb
rbovirt-0.0.10 lib/ovirt/cluster.rb