class OVIRT::DataCenter
Attributes
description[R]
local[R]
status[R]
storage_format[R]
storage_type[R]
supported_versions[R]
version[R]
Public Class Methods
new(client, xml)
click to toggle source
Calls superclass method
OVIRT::BaseObject::new
# File lib/ovirt/datacenter.rb 6 def initialize(client, xml) 7 super(client, xml[:id], xml[:href], (xml/'name').first.text) 8 parse_xml_attributes!(xml) 9 self 10 end
Private Instance Methods
parse_xml_attributes!(xml)
click to toggle source
# File lib/ovirt/datacenter.rb 14 def parse_xml_attributes!(xml) 15 @description = (xml/'description').first.text rescue nil 16 @status = (xml/'status').first.text.strip 17 @local = parse_bool((xml/'local').first.text) rescue nil 18 @storage_type = (xml/'storage_type').first.text rescue nil 19 @storage_format = (xml/'storage_format').first.text rescue nil 20 @supported_versions = (xml/'supported_versions').collect { |v| 21 parse_version v 22 } 23 @version = parse_version xml rescue nil 24 end