From cbfba90bd8bd7ef135488c63d1f618e71572c53e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 14 Jun 2018 09:36:54 +0200 Subject: [PATCH] register stanadard option 'pveclient-output-format' --- PVE/APIClient/Commands/list.pm | 8 +------- PVE/APIClient/Config.pm | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/PVE/APIClient/Commands/list.pm b/PVE/APIClient/Commands/list.pm index db00da7..f12ef87 100644 --- a/PVE/APIClient/Commands/list.pm +++ b/PVE/APIClient/Commands/list.pm @@ -20,13 +20,7 @@ __PACKAGE__->register_method ({ additionalProperties => 0, properties => { remote => get_standard_option('pveclient-remote-name'), - format => { - type => 'string', - description => 'Output format', - enum => [ 'table', 'json' ], - optional => 1, - default => 'table', - } + format => get_standard_option('pveclient-output-format'), }, }, returns => { type => 'null'}, diff --git a/PVE/APIClient/Config.pm b/PVE/APIClient/Config.pm index 478e658..ab84695 100644 --- a/PVE/APIClient/Config.pm +++ b/PVE/APIClient/Config.pm @@ -24,6 +24,14 @@ my $complete_remote_name = sub { return $list; }; +PVE::APIClient::JSONSchema::register_standard_option('pveclient-output-format', { + type => 'string', + description => 'Output format.', + enum => [ 'table', 'json' ], + optional => 1, + default => 'table', +}); + PVE::APIClient::JSONSchema::register_standard_option('pveclient-remote-name', { description => "The name of the remote.", type => 'string', -- 2.39.2