[pve-devel] [pve-storage cli cleanup 5/5] remove print_status
Dietmar Maurer
dietmar at proxmox.com
Thu Aug 9 11:43:54 CEST 2018
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
PVE/CLI/pvesm.pm | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index 3221d02..7d06dcc 100755
--- a/PVE/CLI/pvesm.pm
+++ b/PVE/CLI/pvesm.pm
@@ -117,38 +117,6 @@ __PACKAGE__->register_method ({
return;
}});
-my $print_status = sub {
- my $res = shift;
-
- my $maxlen = 0;
- foreach my $res (@$res) {
- my $storeid = $res->{storage};
- $maxlen = length ($storeid) if length ($storeid) > $maxlen;
- }
- $maxlen+=1;
-
- printf "%-${maxlen}s %10s %10s %15s %15s %15s %8s\n", 'Name', 'Type',
- 'Status', 'Total', 'Used', 'Available', '%';
-
- foreach my $res (sort { $a->{storage} cmp $b->{storage} } @$res) {
- my $storeid = $res->{storage};
-
- my $active = $res->{active} ? 'active' : 'inactive';
- my ($per, $per_fmt) = (0, '% 7.2f%%');
- $per = ($res->{used}*100)/$res->{total} if $res->{total} > 0;
-
- if (!$res->{enabled}) {
- $per = 'N/A';
- $per_fmt = '% 8s';
- $active = 'disabled';
- }
-
- printf "%-${maxlen}s %10s %10s %15d %15d %15d $per_fmt\n", $storeid,
- $res->{type}, $active, $res->{total}/1024, $res->{used}/1024,
- $res->{avail}/1024, $per;
- }
-};
-
__PACKAGE__->register_method ({
name => 'export',
path => 'export',
--
2.11.0
More information about the pve-devel
mailing list