Signed-off-by: Dietmar Maurer <diet...@proxmox.com>
---
 bin/pvesh | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/pvesh b/bin/pvesh
index b1b3be89..7c6e44a0 100755
--- a/bin/pvesh
+++ b/bin/pvesh
@@ -364,25 +364,24 @@ __PACKAGE__->register_method ({
     code => sub {
        my ($param) = @_;
 
-       $opt_nooutput = 1; # we print directly
-
        my $path = $param->{api_path};
 
        my $found = 0;
        foreach my $cmd (qw(get set create delete)) {
            next if $param->{command} && $cmd ne $param->{command};
            my $method = $method_map->{$cmd};
-           my ($handler, $info) = PVE::API2->find_handler($method, $path);
+           my $uri_param = {};
+           my ($handler, $info) = PVE::API2->find_handler($method, $path, 
$uri_param);
            next if !$handler;
            $found = 1;
 
            if ($param->{verbose}) {
                print $handler->usage_str(
-                   $info->{name}, "pvesh $cmd $path", undef, {}, 'full');
+                   $info->{name}, "pvesh $cmd $path", undef, $uri_param, 
'full');
 
            } else {
                print "USAGE: " . $handler->usage_str(
-                   $info->{name}, "pvesh $cmd $path", undef, {}, 'short');
+                   $info->{name}, "pvesh $cmd $path", undef, $uri_param, 
'short');
            }
            if ($param-> {returns}) {
                my $schema = to_json($info->{returns}, {utf8 => 1, canonical => 
1, pretty => 1 });
@@ -402,7 +401,7 @@ __PACKAGE__->register_method ({
     }});
 
 our $cmddef = {
-    usage => [ __PACKAGE__, 'usage', ['api_path'], {}, $format_result ],
+    usage => [ __PACKAGE__, 'usage', ['api_path']],
     get => [ __PACKAGE__, 'get', ['api_path'], {}, $format_result ],
     set => [ __PACKAGE__, 'set', ['api_path'], {}, $format_result ],
     create => [ __PACKAGE__, 'create', ['api_path'], {}, $format_result ],
-- 
2.11.0

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to