Sha256: b1e808fc9b7a8baf0e5bb8fdbd0fbf6bae72bd9676b2938dbef65912f4899958
Contents?: true
Size: 1.26 KB
Versions: 5
Compression:
Stored size: 1.26 KB
Contents
- unless defined?(partial) !!! XML %MachineConfiguration{ :xmlns => CMWG_NAMESPACE } %uri=machine_configurations_url + "/" + @dmtfitem["uri"] %name=@dmtfitem["name"] %description=@dmtfitem["description"] %created=@dmtfitem["created"] - if @dmtfitem["property"] - if @dmtfitem["property"]["name"] && @dmtfitem["property"]["content"] - property_object = {"#{@dmtfitem['property']['name']}" => {"content" => @dmtfitem["property"]["content"]}} - else - property_object = @dmtfitem["property"] - property_object.each_pair do |key, value| %property{ :name => key}=value["content"] %cpu=@dmtfitem["cpu"] %memory{ :quantity => @dmtfitem["memory"]["quantity"], :units => @dmtfitem["memory"]["units"] } - if @dmtfitem["disk"] - if @dmtfitem["disk"].kind_of?(Array) - property_object = @dmtfitem["disk"] - else - property_object = [@dmtfitem["disk"]] - property_object.each do |disk| %disk %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"] } %guestInterface= disk["guestInterface"] %operation{ :rel => "edit", :href => machine_configurations_url + "/" + @dmtfitem["uri"] } %operation{ :rel => "delete", :href => machine_configurations_url + "/" + @dmtfitem["uri"] }
Version data entries
5 entries across 5 versions & 1 rubygems