Sha256: 935ec0173f144b59be4ea8afc1a077b3a0f9cdcc5a982ce4cdf429ccce85b394
Contents?: true
Size: 768 Bytes
Versions: 24
Compression:
Stored size: 768 Bytes
Contents
module OVIRT class Network < BaseObject attr_reader :description, :datacenter, :cluster, :stp, :status 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? @status = ((xml/'status/state').first.text rescue nil) end end end
Version data entries
24 entries across 24 versions & 1 rubygems