class OVIRT::StorageDomain
Attributes
address[R]
available[R]
kind[R]
path[R]
role[R]
used[R]
Public Class Methods
new(client, xml)
click to toggle source
Calls superclass method
OVIRT::BaseObject.new
# File lib/ovirt/storage_domain.rb, line 5 def initialize(client, xml) super(client, xml[:id], xml[:href], (xml/'name').first.text) parse_xml_attributes!(xml) self end
Private Instance Methods
parse_xml_attributes!(xml)
click to toggle source
# File lib/ovirt/storage_domain.rb, line 13 def parse_xml_attributes!(xml) @available = ((xml/'available').first.text rescue nil) @used = ((xml/'used').first.text rescue nil) @role = (xml/'type').first.text @kind = (xml/'storage/type').first.text @address = ((xml/'storage/address').first.text rescue nil) @path = ((xml/'storage/path').first.text rescue nil) end