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 5 def initialize(client, xml) 6 super(client, xml[:id], xml[:href], (xml/'name').first.text) 7 parse_xml_attributes!(xml) 8 self 9 end
Private Instance Methods
parse_xml_attributes!(xml)
click to toggle source
# File lib/ovirt/storage_domain.rb 13 def parse_xml_attributes!(xml) 14 @available = ((xml/'available').first.text rescue nil) 15 @used = ((xml/'used').first.text rescue nil) 16 @role = (xml/'type').first.text 17 @kind = (xml/'storage/type').first.text 18 @address = ((xml/'storage/address').first.text rescue nil) 19 @path = ((xml/'storage/path').first.text rescue nil) 20 end