]> git.proxmox.com Git - pve-manager.git/commitdiff
PVE/API2/Nodes.pm: document return properties for cluster node list.
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 10 Jul 2018 09:43:56 +0000 (11:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Jul 2018 12:16:23 +0000 (14:16 +0200)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
PVE/API2/Nodes.pm

index 9dd90e175994d70a3b036eeba0f05990e9558348..bc29f7038b4c5ccdccc5b9c8cfb00162f36d308b 100644 (file)
@@ -1833,6 +1833,7 @@ use PVE::Cluster;
 use PVE::RESTHandler;
 use PVE::RPCEnvironment;
 use PVE::API2Tools;
+use PVE::JSONSchema qw(get_standard_option);
 
 use base qw(PVE::RESTHandler);
 
@@ -1855,7 +1856,53 @@ __PACKAGE__->register_method ({
        type => 'array',
        items => {
            type => "object",
-           properties => {},
+           properties => {
+               node => get_standard_option('pve-node'),
+               status => {
+                   description => "Node status.",
+                   type => 'string',
+                   enum => ['unknown', 'online', 'offline'],
+               },
+               cpu => {
+                   description => "CPU utilization.",
+                   type => 'number',
+                   optional => 1,
+                   renderer => 'fraction_as_percentage',
+               },
+               maxcpu => {
+                   description => "Number of available CPUs.",
+                   type => 'integer',
+                   optional => 1,
+               },
+               mem => {
+                   description => "Used memory in bytes.",
+                   type => 'string',
+                   optional => 1,
+                   renderer => 'bytes',
+               },
+               maxmem => {
+                   description => "Number of available memory in bytes.",
+                   type => 'integer',
+                   optional => 1,
+                   renderer => 'bytes',
+               },
+               level => {
+                   description => "Support level.",
+                   type => 'string',
+                   optional => 1,
+               },
+               uptime => {
+                   description => "Node uptime in seconds.",
+                   type => 'integer',
+                   optional => 1,
+                   renderer => 'duration',
+               },
+               ssl_fingerprint => {
+                   description => "The SSL fingerprint for the node certificate.",
+                   type => 'string',
+                   optional => 1,
+               },
+           },
        },
        links => [ { rel => 'child', href => "{node}" } ],
     },