From 4467a5d2f21a4661865712d30d9ad20604909010 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 26 Feb 2024 16:55:11 +0100 Subject: [PATCH] api: node status: document boot-info and current-kernel in return schema I recently added the same info to PMG and added them to the return schema, so copying them over here comes for free, and while far from complete but better than nothing. Signed-off-by: Thomas Lamprecht --- PVE/API2/Nodes.pm | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 3619190d..67a8ce22 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -396,8 +396,47 @@ __PACKAGE__->register_method({ }, returns => { type => "object", + additionalProperties => 1, properties => { - + # TODO: document remaing ones + 'boot-info' => { + description => "Meta-information about the boot mode.", + type => 'object', + properties => { + mode => { + description => 'Through which firmware the system got booted.', + type => 'string', + enum => [qw(efi legacy-bios)], + }, + secureboot => { + description => 'System is booted in secure mode, only applicable for the "efi" mode.', + type => 'boolean', + optional => 1, + }, + }, + }, + 'current-kernel' => { + description => "The uptime of the system in seconds.", + type => 'object', + properties => { + sysname => { + description => 'OS kernel name (e.g., "Linux")', + type => 'string', + }, + release => { + description => 'OS kernel release (e.g., "6.8.0")', + type => 'string', + }, + version => { + description => 'OS kernel version with build info', + type => 'string', + }, + machine => { + description => 'Hardware (architecture) type', + type => 'string', + }, + }, + }, }, }, code => sub {