diff --git a/zunclient/osc/v1/hosts.py b/zunclient/osc/v1/hosts.py index 6370803f..b269ae67 100644 --- a/zunclient/osc/v1/hosts.py +++ b/zunclient/osc/v1/hosts.py @@ -15,6 +15,8 @@ import logging from osc_lib.command import command from osc_lib import utils +from zunclient.common import utils as zun_utils + def _host_columns(host): del host._info['links'] @@ -62,6 +64,7 @@ class ListHost(command.Lister): opts['limit'] = parsed_args.limit opts['sort_key'] = parsed_args.sort_key opts['sort_dir'] = parsed_args.sort_dir + opts = zun_utils.remove_null_parms(**opts) hosts = client.hosts.list(**opts) columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'os', 'labels') return (columns, (utils.get_item_properties(host, columns) diff --git a/zunclient/osc/v1/images.py b/zunclient/osc/v1/images.py index 597fd45e..bedae204 100644 --- a/zunclient/osc/v1/images.py +++ b/zunclient/osc/v1/images.py @@ -15,6 +15,8 @@ import logging from osc_lib.command import command from osc_lib import utils +from zunclient.common import utils as zun_utils + def _image_columns(image): return image._info.keys() @@ -61,6 +63,7 @@ class ListImage(command.Lister): opts['limit'] = parsed_args.limit opts['sort_key'] = parsed_args.sort_key opts['sort_dir'] = parsed_args.sort_dir + opts = zun_utils.remove_null_parms(**opts) images = client.images.list(**opts) columns = ('uuid', 'image_id', 'repo', 'tag', 'size') return (columns, (utils.get_item_properties(image, columns) diff --git a/zunclient/v1/hosts_shell.py b/zunclient/v1/hosts_shell.py index 467d2bd0..841339f4 100644 --- a/zunclient/v1/hosts_shell.py +++ b/zunclient/v1/hosts_shell.py @@ -40,6 +40,7 @@ def do_host_list(cs, args): opts['limit'] = args.limit opts['sort_key'] = args.sort_key opts['sort_dir'] = args.sort_dir + opts = zun_utils.remove_null_parms(**opts) hosts = cs.hosts.list(**opts) columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'os', 'labels') utils.print_list(hosts, columns, diff --git a/zunclient/v1/images_shell.py b/zunclient/v1/images_shell.py index ddb2a767..c9619dcd 100644 --- a/zunclient/v1/images_shell.py +++ b/zunclient/v1/images_shell.py @@ -51,6 +51,7 @@ def do_image_list(cs, args): opts['limit'] = args.limit opts['sort_key'] = args.sort_key opts['sort_dir'] = args.sort_dir + opts = zun_utils.remove_null_parms(**opts) images = cs.images.list(**opts) columns = ('uuid', 'image_id', 'repo', 'tag', 'size') utils.print_list(images, columns,