From 3749ebaee5a098fc33a0b2db181ed3f74a532c7d Mon Sep 17 00:00:00 2001 From: Sawan Choudhary Date: Tue, 7 Apr 2020 00:02:08 -0700 Subject: [PATCH] Handle cloudpulse result when result < 240 Change-Id: I82166f06b37d1821ce6d05f92d66c9f28db6091f --- cloudpulseclient/openstack/common/cliutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudpulseclient/openstack/common/cliutils.py b/cloudpulseclient/openstack/common/cliutils.py index a5b0bed..e633d70 100644 --- a/cloudpulseclient/openstack/common/cliutils.py +++ b/cloudpulseclient/openstack/common/cliutils.py @@ -187,13 +187,13 @@ def print_list(objs, fields, formatters=None, sortby_index=0, # Limit the number to 25 (default) or provided number from user # Show last entries after sorting - kwargs['start'] = 240 - limit_number - kwargs['end'] = 240 + kwargs['start'] = 0 + kwargs['end'] = limit_number pt = prettytable.PrettyTable(field_labels) pt.align = 'l' - for o in objs: + for o in objs[::-1]: row = [] for field in fields: if field in formatters: