Sha256: b4886a54c2d99cda3d140b2800dfcbc1d1c4d2fc628bcd382b6176da20b5f1a6

Contents?: true

Size: 451 Bytes

Versions: 11

Compression:

Stored size: 451 Bytes

Contents

module OVIRT
  class DiskProfile < BaseObject
    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)
      @disk_profile = ((xml/'disk_profile').first[:id] rescue nil)
      @name = ((xml/'name').first.text rescue nil)
      @storage_domain = ((xml/'storagedomains').first[:id] rescue nil)
    end
  end
end

Version data entries

11 entries across 9 versions & 2 rubygems

Version Path
rbovirt-0.1.7 lib/ovirt/disk_profile.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rbovirt-0.1.6/lib/ovirt/disk_profile.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rbovirt-0.1.6/lib/ovirt/disk_profile.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rbovirt-0.1.6/lib/ovirt/disk_profile.rb
rbovirt-0.1.6 lib/ovirt/disk_profile.rb
rbovirt-0.1.5 lib/ovirt/disk_profile.rb
rbovirt-0.1.4 lib/ovirt/disk_profile.rb
rbovirt-0.1.3 lib/ovirt/disk_profile.rb
rbovirt-0.1.2 lib/ovirt/disk_profile.rb
rbovirt-0.1.1 lib/ovirt/disk_profile.rb
rbovirt-0.1.0 lib/ovirt/disk_profile.rb