class OVIRT::Cluster

Attributes

datacenter[R]
description[R]
version[R]

Public Class Methods

new(client, xml) click to toggle source
Calls superclass method OVIRT::BaseObject.new
# File lib/ovirt/cluster.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/cluster.rb, line 13
def parse_xml_attributes!(xml)
  @description = ((xml/'description').first.text rescue nil)
  @version = parse_version(xml)
  @datacenter = Link::new(@client, (xml/'data_center').first[:id], (xml/'data_center').first[:href]) unless (xml/'data_center').empty?
end