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, line 6 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/datacenter.rb, line 14 def parse_xml_attributes!(xml) @description = (xml/'description').first.text rescue nil @status = (xml/'status').first.text.strip @local = parse_bool((xml/'local').first.text) rescue nil @storage_type = (xml/'storage_type').first.text rescue nil @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