[pve-devel] r5380 - pve-storage/pve2/PVE/API2

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jan 13 08:23:13 CET 2011


Author: dietmar
Date: 2011-01-13 08:23:13 +0100 (Thu, 13 Jan 2011)
New Revision: 5380

Modified:
   pve-storage/pve2/PVE/API2/Storage.pm
Log:


Modified: pve-storage/pve2/PVE/API2/Storage.pm
===================================================================
--- pve-storage/pve2/PVE/API2/Storage.pm	2011-01-13 07:21:20 UTC (rev 5379)
+++ pve-storage/pve2/PVE/API2/Storage.pm	2011-01-13 07:23:13 UTC (rev 5380)
@@ -93,12 +93,11 @@
 	    type => "object",
 	    properties => {},
 	},
-#	links => [ { rel => 'child', href => "{storage}" } ],
     },
     code => sub {
 	my ($param) = @_;
 
-	my $nodes = [ 'node-0', 'node-1', 'node-2', 'node-3' ]; # fixme: use the real list
+	my $nodes = PVE::Cluster::get_nodelist();
 
 	my $cfg = read_file ("storagecfg");
 
@@ -112,7 +111,8 @@
 		push @$res, $data;
 	    } else {
 		# we create a entry for each node
-		foreach my $node (@$nodes) {
+		foreach my $nd (@$nodes) {
+		    my $node = $nd->{node};
 		    my $data = { name => "$storeid ($node)", storage => $storeid, node => $node, 
 				 type => $scfg->{type}, shared => 0};
 		    push @$res, $data;



More information about the pve-devel mailing list