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

diff --git a/bin/pvesh b/bin/pvesh
index a5a9b9fb..b1b3be89 100755
--- a/bin/pvesh
+++ b/bin/pvesh
@@ -347,6 +347,11 @@ __PACKAGE__->register_method ({
                type => 'boolean',
                optional => 1,
            },
+           returns => {
+               description => "Including schema for returned data.",
+               type => 'boolean',
+               optional => 1,
+           },
            command => {
                description => "API command.",
                type => 'string',
@@ -374,10 +379,15 @@ __PACKAGE__->register_method ({
            if ($param->{verbose}) {
                print $handler->usage_str(
                    $info->{name}, "pvesh $cmd $path", undef, {}, 'full');
+
            } else {
                print "USAGE: " . $handler->usage_str(
                    $info->{name}, "pvesh $cmd $path", undef, {}, 'short');
            }
+           if ($param-> {returns}) {
+               my $schema = to_json($info->{returns}, {utf8 => 1, canonical => 
1, pretty => 1 });
+               print "RETURNS: $schema\n";
+           }
        }
 
        if (!$found) {
-- 
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