Sha256: 680fa5bb0289c34c804e21218ea624da32ab7313dfc7efc949ca251bb12ba388
Contents?: true
Size: 737 Bytes
Versions: 2
Compression:
Stored size: 737 Bytes
Contents
module OVIRT class DataCenter < BaseObject attr_reader :description, :status, :storage_type, :storage_format, :supported_versions, :version 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 @status = (xml/'status').first.text.strip @storage_type = (xml/'storage_type').first.text @storage_format = (xml/'storage_format').first.text @supported_versions = (xml/'supported_versions').collect { |v| parse_version v } @version = parse_version xml rescue nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rbovirt-0.0.3 | lib/ovirt/datacenter.rb |
rbovirt-0.0.2 | lib/ovirt/datacenter.rb |