[pve-devel] r6339 - in pve-storage/pve2: . PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 21 09:04:32 CEST 2011


Author: dietmar
Date: 2011-07-21 09:04:32 +0200 (Thu, 21 Jul 2011)
New Revision: 6339

Modified:
   pve-storage/pve2/ChangeLog
   pve-storage/pve2/PVE/Storage.pm
   pve-storage/pve2/pvesm
Log:
do not list disabled storages


Modified: pve-storage/pve2/ChangeLog
===================================================================
--- pve-storage/pve2/ChangeLog	2011-07-21 06:19:34 UTC (rev 6338)
+++ pve-storage/pve2/ChangeLog	2011-07-21 07:04:32 UTC (rev 6339)
@@ -1,3 +1,7 @@
+2011-07-21  Proxmox Support Team  <support at proxmox.com>
+
+	* PVE/Storage.pm (storage_info): do not list disabled storages
+
 2011-05-06  Proxmox Support Team  <support at proxmox.com>
 
 	* PVE/API2/Storage/Status.pm: impl. content filter

Modified: pve-storage/pve2/PVE/Storage.pm
===================================================================
--- pve-storage/pve2/PVE/Storage.pm	2011-07-21 06:19:34 UTC (rev 6338)
+++ pve-storage/pve2/PVE/Storage.pm	2011-07-21 07:04:32 UTC (rev 6339)
@@ -1968,6 +1968,8 @@
 
 	next if $content && !$ids->{$storeid}->{content}->{$content};
 
+	next if $ids->{$storeid}->{disable};
+
 	my $type = $ids->{$storeid}->{type};
 
 	$info->{$storeid} = { 

Modified: pve-storage/pve2/pvesm
===================================================================
--- pve-storage/pve2/pvesm	2011-07-21 06:19:34 UTC (rev 6338)
+++ pve-storage/pve2/pvesm	2011-07-21 07:04:32 UTC (rev 6339)
@@ -188,8 +188,8 @@
 	my $sum = $res->{used} + $res->{avail};
 	my $per = $sum ? (0.5 + ($res->{used}*100)/$sum) : 100;
 
-	printf "%-${maxlen}s %5s %1d %1d %15d %15d %15d %.2f%%\n", $storeid, 
-	$res->{type},$res->{disable}, $res->{active},
+	printf "%-${maxlen}s %5s %1d %15d %15d %15d %.2f%%\n", $storeid, 
+	$res->{type}, $res->{active},
 	$res->{total}/1024, $res->{used}/1024, $res->{avail}/1024, $per; 
     }
 };




More information about the pve-devel mailing list