From 658b4e62f3eb8a8eac8818378fc923dee6bccf0c Mon Sep 17 00:00:00 2001 From: Alejandro Huertas Date: Fri, 5 Apr 2019 16:17:14 +0200 Subject: [PATCH] F #3076: fix an issue when using pipe the method called was info, not infoextended --- src/cli/one_helper.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index 3906290d12c..1b0e0a13430 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -672,11 +672,12 @@ def list_pool_table(table, pool, options, filter_flag) # List pool in XML format, pagination is used in interactive output #----------------------------------------------------------------------- def list_pool_xml(pool, options, filter_flag) + extended = options.include?(:extended) && options[:extended] + if $stdout.isatty size = $stdout.winsize[0] - 1 # ----------- First page, check if pager is needed ------------- - extended = options.include?(:extended) && options[:extended] rc = pool.get_page(size, 0, extended) ps = "" @@ -724,7 +725,11 @@ def list_pool_xml(pool, options, filter_flag) stop_pager(ppid) else - rc = pool.info + if pool.pool_name == "VM_POOL" && extended + rc = pool.info_all_extended + else + rc = pool.info + end return -1, rc.message if OpenNebula.is_error?(rc)