[pve-devel] r5433 - in pve-manager/pve2: lib/PVE/API2 www/manager

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Jan 25 08:30:40 CET 2011


Author: dietmar
Date: 2011-01-25 08:30:40 +0100 (Tue, 25 Jan 2011)
New Revision: 5433

Modified:
   pve-manager/pve2/lib/PVE/API2/Cluster.pm
   pve-manager/pve2/www/manager/PVECache.js
Log:
cleanup api


Modified: pve-manager/pve2/lib/PVE/API2/Cluster.pm
===================================================================
--- pve-manager/pve2/lib/PVE/API2/Cluster.pm	2011-01-25 07:15:54 UTC (rev 5432)
+++ pve-manager/pve2/lib/PVE/API2/Cluster.pm	2011-01-25 07:30:40 UTC (rev 5433)
@@ -37,7 +37,34 @@
     code => sub {
 	my ($param) = @_;
     
+	my $result = [
+	    { name => 'nodes' },
+	    { name => 'log' },
+	    ];
 
+	return $result;
+    }});
+
+__PACKAGE__->register_method ({
+    name => 'nodes', 
+    path => 'nodes', 
+    method => 'GET',
+    description => "Cluster node index.",
+    parameters => {
+    	additionalProperties => 0,
+	properties => {},
+    },
+    returns => {
+	type => 'array',
+	items => {
+	    type => "object",
+	    properties => {},
+	},
+    },
+    code => sub {
+	my ($param) = @_;
+    
+
 	my $clinfo = PVE::Cluster::get_clinfo();
 	my $result = [];
 

Modified: pve-manager/pve2/www/manager/PVECache.js
===================================================================
--- pve-manager/pve2/www/manager/PVECache.js	2011-01-25 07:15:54 UTC (rev 5432)
+++ pve-manager/pve2/www/manager/PVECache.js	2011-01-25 07:30:40 UTC (rev 5433)
@@ -31,7 +31,7 @@
 		itype: 'node',
 		idProperty: 'name',
 		autoDestroy: false,
-		url: '/api2/json/cluster',
+		url: '/api2/json/cluster/nodes',
 		fields: fields
 	    });
 




More information about the pve-devel mailing list