Sha256: d3598ccd8080912d702859c7eb7ef25338808d8b490ddb9a5f844966fbdb69c0

Contents?: true

Size: 748 Bytes

Versions: 18

Compression:

Stored size: 748 Bytes

Contents

module OVIRT
  class DataCenter < BaseObject
    attr_reader :description, :status, :storage_type, :storage_format, :supported_versions, :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
      @status = (xml/'status').first.text.strip
      @storage_type = (xml/'storage_type').first.text
      @storage_format = (xml/'storage_format').first.text rescue nil
      @supported_versions = (xml/'supported_versions').collect { |v|
        parse_version v
      }
      @version = parse_version xml rescue nil
    end
  end
 
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rbovirt-0.0.21 lib/ovirt/datacenter.rb
rbovirt-0.0.20 lib/ovirt/datacenter.rb
rbovirt-0.0.19 lib/ovirt/datacenter.rb
rbovirt-0.0.18 lib/ovirt/datacenter.rb
rbovirt-0.0.17 lib/ovirt/datacenter.rb
rbovirt-0.0.16 lib/ovirt/datacenter.rb
rbovirt-0.0.15 lib/ovirt/datacenter.rb
rbovirt-0.0.14 lib/ovirt/datacenter.rb
rbovirt-0.0.13 lib/ovirt/datacenter.rb
rbovirt-0.0.12 lib/ovirt/datacenter.rb
rbovirt-0.0.11 lib/ovirt/datacenter.rb
rbovirt-0.0.10 lib/ovirt/datacenter.rb
rbovirt-0.0.9 lib/ovirt/datacenter.rb
rbovirt-0.0.8 lib/ovirt/datacenter.rb
rbovirt-0.0.7 lib/ovirt/datacenter.rb
rbovirt-0.0.6 lib/ovirt/datacenter.rb
rbovirt-0.0.5 lib/ovirt/datacenter.rb
rbovirt-0.0.4 lib/ovirt/datacenter.rb