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
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/cluster.rb
13 def parse_xml_attributes!(xml)
14   @description = ((xml/'description').first.text rescue nil)
15   @version = parse_version(xml)
16   @datacenter = Link::new(@client, (xml/'data_center').first[:id], (xml/'data_center').first[:href]) unless (xml/'data_center').empty?
17 end