Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F #3076: fix an issue when using pipe the method called was info, not… #3196

Merged
merged 1 commit into from
Apr 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/cli/one_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down Expand Up @@ -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)

Expand Down