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.1.7 lib/ovirt/cluster.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rbovirt-0.1.6/lib/ovirt/cluster.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rbovirt-0.1.6/lib/ovirt/cluster.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rbovirt-0.1.6/lib/ovirt/cluster.rb
rbovirt-0.1.6 lib/ovirt/cluster.rb
rbovirt-0.1.5 lib/ovirt/cluster.rb
rbovirt-0.1.4 lib/ovirt/cluster.rb
rbovirt-0.1.3 lib/ovirt/cluster.rb
rbovirt-0.1.2 lib/ovirt/cluster.rb
rbovirt-0.0.38 lib/ovirt/cluster.rb
rbovirt-0.1.1 lib/ovirt/cluster.rb
rbovirt-0.0.37 lib/ovirt/cluster.rb
rbovirt-0.0.36 lib/ovirt/cluster.rb
rbovirt-0.1.0 lib/ovirt/cluster.rb
rbovirt-0.0.35 lib/ovirt/cluster.rb
rbovirt-0.0.34 lib/ovirt/cluster.rb
rbovirt-0.0.33 lib/ovirt/cluster.rb
rbovirt-0.0.32 lib/ovirt/cluster.rb
rbovirt-0.0.31 lib/ovirt/cluster.rb
rbovirt-0.0.30 lib/ovirt/cluster.rb