From: Dietmar Maurer Date: Wed, 4 Jul 2018 06:54:16 +0000 (+0200) Subject: adopt code for changes in pve-common X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=commitdiff_plain;h=faa47c20e27c8d4050594e9abaa2c65d792a7eda adopt code for changes in pve-common --- diff --git a/PVE/APIClient/Commands/list.pm b/PVE/APIClient/Commands/list.pm index f5388f1..10a8f7c 100644 --- a/PVE/APIClient/Commands/list.pm +++ b/PVE/APIClient/Commands/list.pm @@ -30,7 +30,7 @@ __PACKAGE__->register_method ({ additionalProperties => 0, properties => { remote => get_standard_option('pveclient-remote-name'), - 'format' => get_standard_option('pveclient-output-format'), + 'format' => get_standard_option('pve-output-format'), }, }, returns => { diff --git a/PVE/APIClient/Commands/remote.pm b/PVE/APIClient/Commands/remote.pm index 6124bbe..2e5337a 100644 --- a/PVE/APIClient/Commands/remote.pm +++ b/PVE/APIClient/Commands/remote.pm @@ -36,7 +36,7 @@ __PACKAGE__->register_method ({ parameters => { additionalProperties => 0, properties => { - 'format' => get_standard_option('pveclient-output-format'), + 'format' => get_standard_option('pve-output-format'), }, }, returns => { diff --git a/PVE/APIClient/Config.pm b/PVE/APIClient/Config.pm index 9ab68fc..5437be6 100644 --- a/PVE/APIClient/Config.pm +++ b/PVE/APIClient/Config.pm @@ -28,14 +28,6 @@ my $complete_remote_name = sub { return $list; }; -PVE::APIClient::JSONSchema::register_standard_option('pveclient-output-format', { - type => 'string', - description => 'Output format.', - enum => [ 'text', 'plain', 'json' ], - optional => 1, - default => 'text', -}); - PVE::APIClient::JSONSchema::register_standard_option('pveclient-remote-name', { description => "The name of the remote.", type => 'string', diff --git a/pve-api-definition.dat b/pve-api-definition.dat index f21a6db..67fb816 100644 Binary files a/pve-api-definition.dat and b/pve-api-definition.dat differ diff --git a/pveclient b/pveclient index c87b2cc..09e3086 100755 --- a/pveclient +++ b/pveclient @@ -94,7 +94,7 @@ if (my $info = PVE::APIClient::Helpers::extract_path_info($uri_param)) { $path_returns = $info->{returns}; } -$path_properties->{format} = get_standard_option('pveclient-output-format'), +$path_properties->{format} = get_standard_option('pve-output-format'), $path_properties->{remote} = get_standard_option('pveclient-remote-name'); $path_properties->{api_path} = { description => "API path.", @@ -151,8 +151,8 @@ __PACKAGE__->register_method ({ __PACKAGE__->register_method ({ name => 'pveclient_create', path => 'pveclient_create', - method => 'PUSH', - description => "Call API PUSH on .", + method => 'POST', + description => "Call API POST on .", parameters => { additionalProperties => 0, properties => $path_properties,