[pve-devel] [pve-storage cli cleanup 2/5] pvesm list: use print_api_result
Dietmar Maurer
dietmar at proxmox.com
Thu Aug 9 11:43:42 CEST 2018
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
PVE/CLI/pvesm.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index c82bb6f..9413aa9 100755
--- a/PVE/CLI/pvesm.pm
+++ b/PVE/CLI/pvesm.pm
@@ -332,8 +332,11 @@ our $cmddef = {
my $props = ['storage', 'type', 'enabled', 'active', 'shared', 'total', 'used', 'used_fraction'];
PVE::CLIFormatter::print_api_result($data, $schema, $props, $options);
}, $PVE::RESTHandler::standard_output_options],
- list => [ "PVE::API2::Storage::Content", 'index', ['storage'],
- { node => $nodename }, $print_content ],
+ list => [ "PVE::API2::Storage::Content", 'index', ['storage'], { node => $nodename }, sub {
+ my ($data, $schema, $options) = @_;
+ my $props = ['volid', 'format', 'size', 'vmid'];
+ PVE::CLIFormatter::print_api_result($data, $schema, $props, $options);
+ }, $PVE::RESTHandler::standard_output_options],
alloc => [ "PVE::API2::Storage::Content", 'create', ['storage', 'vmid', 'filename', 'size'],
{ node => $nodename }, sub {
my $volid = shift;
--
2.11.0
More information about the pve-devel
mailing list