[pve-devel] [PATCH manager] fixe return values in /cluster/resources

Dominik Csapak d.csapak at proxmox.com
Fri Aug 17 13:18:14 CEST 2018


openvz is deprecated but can still be a return value
maxcpu is a number, not an integer

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/API2/Cluster.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index 2c408b5b..7700ca13 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -179,7 +179,7 @@ __PACKAGE__->register_method({
 		type => {
 		    description => "Resource type.",
 		    type => 'string',
-		    enum => ['node', 'storage', 'pool', 'qemu', 'lxc'],
+		    enum => ['node', 'storage', 'pool', 'qemu', 'lxc', 'openvz'],
 		},
 		status => {
 		    description => "Resource type dependent status.",
@@ -207,7 +207,7 @@ __PACKAGE__->register_method({
 		},
 		maxcpu => {
 		    description => "Number of available CPUs (when type in node,qemu,lxc).",
-		    type => 'integer',
+		    type => 'number',
 		    optional => 1,
 		},
 		mem => {
-- 
2.11.0





More information about the pve-devel mailing list