1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #3264: Fix csv output for empty responses

This commit is contained in:
Carlos Martín 2014-11-06 13:22:13 +01:00
parent 8d6af8f282
commit e30d372045
2 changed files with 5 additions and 19 deletions

View File

@ -213,7 +213,11 @@ cmd = CommandParser::CmdParser.new(ARGV) do
end
if options[:csv]
a = data_hash['SHOWBACK_RECORDS']['SHOWBACK']
a = Array.new
if data_hash['SHOWBACK_RECORDS']
a = data_hash['SHOWBACK_RECORDS']['SHOWBACK']
end
AcctHelper::SHOWBACK_TABLE.show(a, options)
exit(0)

View File

@ -834,24 +834,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
end
showback_desc = <<-EOT.unindent
Development command to get raw showback data
EOT
command :showback, showback_desc, [:filterflag, nil] do
rc = OpenNebula::VirtualMachinePool.new(helper.client).showback_xml(args[0])
if OpenNebula.is_error?(rc)
warn rc.message
exit -1
else
puts rc
exit 0
end
end
START_TIME = {
:name => "start_time",
:short => "-s TIME",