Sha256: 050b0286c72e9b0d8733e37b7fe35715460fa4a2790c9f1b891b1e91aebf6a5f
Contents?: true
Size: 697 Bytes
Versions: 13
Compression:
Stored size: 697 Bytes
Contents
module OVIRT class Network < BaseObject attr_reader :description, :datacenter, :cluster, :stp def initialize(client, xml) super(client, xml[:id], xml[:href], (xml/'name').first.text) parse_xml_attributes!(xml) self end private def parse_xml_attributes!(xml) @description = ((xml/'description').first.text rescue nil) @stp = ((xml/'stp').first.text rescue false) @datacenter = Link::new(@client, (xml/'data_center').first[:id], (xml/'data_center').first[:href]) unless (xml/'data_center').empty? @cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href]) unless (xml/'cluster').empty? end end end
Version data entries
13 entries across 13 versions & 1 rubygems