[pve-devel] [PATCH common v2 2/3] Add output_parameters to bash_completion and usage

Stoiko Ivanov s.ivanov at proxmox.com
Mon Jul 16 20:58:59 CEST 2018


Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 src/PVE/CLIHandler.pm  | 4 +++-
 src/PVE/RESTHandler.pm | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
index 7145707..5744daf 100644
--- a/src/PVE/CLIHandler.pm
+++ b/src/PVE/CLIHandler.pm
@@ -406,7 +406,9 @@ my $print_bash_completion = sub {
 
     my $info = $class->map_method_by_name($name);
 
-    my $prop = $info->{parameters}->{properties};
+    my $param = $info->{parameters};
+    $param = PVE::RESTHandler::add_standard_output_parameters($info->{parameters});
+    my $prop = $param->{properties};
 
     my $print_parameter_completion = sub {
 	my ($pname) = @_;
diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
index 35e46eb..377249d 100644
--- a/src/PVE/RESTHandler.pm
+++ b/src/PVE/RESTHandler.pm
@@ -585,7 +585,7 @@ sub getopt_usage {
 
     my $schema = $info->{parameters};
     my $name = $info->{name};
-    my $prop = $schema->{properties};
+    my $prop = add_standard_output_parameters($schema)->{properties};
 
     my $out = '';
 
-- 
2.11.0





More information about the pve-devel mailing list