From 668f6d9faffb3b6da8b1957eb3f2c3711dd35e98 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 20 Feb 2016 10:11:59 +0100 Subject: [PATCH] add lvmthinscan to CLI --- PVE/API2/Storage/Scan.pm | 3 ++- PVE/CLI/pvesm.pm | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Storage/Scan.pm b/PVE/API2/Storage/Scan.pm index 3e3f2c3..11d139f 100644 --- a/PVE/API2/Storage/Scan.pm +++ b/PVE/API2/Storage/Scan.pm @@ -239,7 +239,7 @@ __PACKAGE__->register_method ({ }}); __PACKAGE__->register_method ({ - name => 'thinlvmscan', + name => 'lvmthinscan', path => 'lvmthin', method => 'GET', description => "List local LVM Thin Pools.", @@ -270,6 +270,7 @@ __PACKAGE__->register_method ({ }, code => sub { my ($param) = @_; + return PVE::Storage::LvmThinPlugin::list_thinpools($param->{vg}); }}); diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 0724eaa..771c881 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -159,6 +159,13 @@ our $cmddef = { printf "$rec->{vg}\n"; } }], + lvmthinscan => [ "PVE::API2::Storage::Scan", 'lvmthinscan', ['vg'], + { node => $nodename }, sub { + my $res = shift; + foreach my $rec (@$res) { + printf "$rec->{lv}\n"; + } + }], zfsscan => [ "PVE::API2::Storage::Scan", 'zfsscan', [], { node => $nodename }, sub { my $res = shift;