[pve-devel] applied: [PATCH pve-client] register stanadard option 'pveclient-output-format'

Dietmar Maurer dietmar at proxmox.com
Thu Jun 14 10:31:17 CEST 2018


applied

> On June 14, 2018 at 9:38 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
> 
> 
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
>  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.11.0
> 
> 




More information about the pve-devel mailing list