module CloudCLI
Command line help functions
Public Instance Methods
cmd_name()
click to toggle source
Returns the command name
# File lib/cloud/CloudClient.rb, line 225 def cmd_name File.basename($0) end
print_xml(xml_text)
click to toggle source
# File lib/cloud/CloudClient.rb, line 198 def print_xml(xml_text) begin doc = REXML::Document.new(xml_text) rescue REXML::ParseException => e return e.message, -1 end xml = doc.root if xml.nil? return xml_text, -1 end str = String.new if REXML_FORMATTERS formatter = REXML::Formatters::Pretty.new formatter.compact = true formatter.write(xml,str) else str = xml.to_s end return str, 0 end
version_text()
click to toggle source
# File lib/cloud/CloudClient.rb, line 229 def version_text version=<<EOT OpenNebula #{CloudClient::VERSION} Copyright 2002-2020, OpenNebula Project, OpenNebula Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 EOT end