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:
parent
8d6af8f282
commit
e30d372045
@ -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)
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user