From: garciadeblas Date: Mon, 17 Feb 2025 10:11:46 +0000 (+0100) Subject: Multiple output formats in list and show commands for OKA and KSU X-Git-Tag: v18.0.0~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F14987%2F1;p=osm%2Fosmclient.git Multiple output formats in list and show commands for OKA and KSU Change-Id: If962b7d539aae178a1bcc3a0a9bfc3496b0603a2 Signed-off-by: garciadeblas --- diff --git a/osmclient/cli_commands/ksu.py b/osmclient/cli_commands/ksu.py index a66571a..8fddacb 100755 --- a/osmclient/cli_commands/ksu.py +++ b/osmclient/cli_commands/ksu.py @@ -288,7 +288,7 @@ def ksu_delete(ctx, ksus, force): def ksu_list(ctx, filter, output): """list all Kubernetes SW Units (KSU)""" logger.debug("") - common.generic_list(callback=ctx.obj.ksu.list, filter=filter) + common.generic_list(callback=ctx.obj.ksu.list, filter=filter, format=output) @click.command(name="ksu-show", short_help="shows the details of a KSU") @@ -301,7 +301,7 @@ def ksu_show(ctx, name, output): NAME: name or ID of the KSU """ logger.debug("") - common.generic_show(callback=ctx.obj.ksu.get, name=name) + common.generic_show(callback=ctx.obj.ksu.get, name=name, format=output) @click.command( diff --git a/osmclient/cli_commands/oka.py b/osmclient/cli_commands/oka.py index 74cdc70..a6457d9 100755 --- a/osmclient/cli_commands/oka.py +++ b/osmclient/cli_commands/oka.py @@ -165,7 +165,7 @@ def oka_delete(ctx, name, force): def oka_list(ctx, filter, output): """list all OSM Kubernetes Application (OKA)""" logger.debug("") - common.generic_list(callback=ctx.obj.oka.list, filter=filter) + common.generic_list(callback=ctx.obj.oka.list, filter=filter, format=output) @click.command( @@ -181,7 +181,7 @@ def oka_show(ctx, name, output): NAME: name or ID of the OKA """ logger.debug("") - common.generic_show(callback=ctx.obj.oka.get, name=name) + common.generic_show(callback=ctx.obj.oka.get, name=name, format=output) @click.command(