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

B OpenNebula/one#6509: CLI not reporting error (#2970)

for json and yaml options

Signed-off-by: Daniel <dgarcia@opennebula.io>
This commit is contained in:
dgarcia18 2024-03-05 19:41:21 +01:00 committed by GitHub
parent 1f6582fc25
commit 68a9dc3e30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -918,12 +918,12 @@ EOT
elsif options[:xml]
return list_pool_xml(pool, options, filter_flag)
elsif options[:json]
list_pool_format(pool, options, filter_flag) do |pool|
return list_pool_format(pool, options, filter_flag) do |pool|
hash = check_resource_xsd(pool, pname)
puts ::JSON.pretty_generate(hash)
end
elsif options[:yaml]
list_pool_format(pool, options, filter_flag) do |pool|
return list_pool_format(pool, options, filter_flag) do |pool|
hash = check_resource_xsd(pool, pname)
puts hash.to_yaml(:indent => 4)
end