[pve-devel] [pve-manager cli cleanup 4/4] pveam list: use print_api_result

Dietmar Maurer dietmar at proxmox.com
Thu Aug 9 11:43:49 CEST 2018


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/CLI/pveam.pm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm
index ee103be5..13e48bdf 100644
--- a/PVE/CLI/pveam.pm
+++ b/PVE/CLI/pveam.pm
@@ -122,7 +122,17 @@ __PACKAGE__->register_method ({
 	type => 'array',
 	items => {
 	    type => "object",
-	    properties => {},
+	    properties => {
+		volid => {
+		    type => 'string',
+		    description => "Template volume identifier.",
+		},
+		size => {
+		    type => 'integer',
+		    description => "Template size.",
+		    renderer => 'bytes',
+		},
+	    },
 	},
     },
     code => sub {
@@ -212,7 +222,10 @@ our $cmddef = {
 	my ($data, $schema, $options) = @_;
 	PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
     }, $PVE::RESTHandler::standard_output_options],
-    list => [  __PACKAGE__, 'index', [ 'storage' ], { node => $nodename }, $print_list ],
+    list => [  __PACKAGE__, 'index', [ 'storage' ], { node => $nodename }, sub {
+	my ($data, $schema, $options) = @_;
+	PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
+    }, $PVE::RESTHandler::standard_output_options],
     remove => [  __PACKAGE__, 'remove', [ 'template_path' ], { node => $nodename }]
 };
 
-- 
2.11.0




More information about the pve-devel mailing list