From e3a73a504f6a63bf1a716131cf9dea75dc7b0b41 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Fri, 6 Sep 2024 12:25:01 +0200 Subject: rest: add GET /efi Add GET /efi request to obtain information about the client's boot entries. Field inside the /refresh payload 'efi': { 'entries': [ { "order": 0, "name": "Boot0000", "active": false, "description": "grub" }, { "order": 1, "name": "Boot0001", "active": true, "description": "UEFI: PXE IP4 Realtek PCIe GBE Family Controller" } ] } If the client is not a EFI system it won't add the 'efi' field. If an entry is not in the boot order it won't have the 'order' field. GET /efi resquest payload structure: { 'clients': ['10.141.10.21', '10.141.10.22'] } GET /efi response's structure: { 'clients': [ { 'ip': '10.141.10.21', 'entries': [ { "order": 0, "name": "Boot0000", "active": false, "description": "grub" }, { "order": 1, "name": "Boot0001", "active": true, "description": "UEFI: PXE IP4 Realtek PCIe GBE Family Controller" } ] }, { 'ip': '10.141.10.22', 'entries': [] } ] } The client with ip 10.141.10.22 is a BIOS system. If an entry does not appear in the boot order it won't have the 'order' field. --- src/rest.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rest.h') diff --git a/src/rest.h b/src/rest.h index fea0849..28ccfda 100644 --- a/src/rest.h +++ b/src/rest.h @@ -128,6 +128,7 @@ enum og_rest_uri { OG_URI_IMAGE_DELETE, OG_URI_IMAGE_RESTRICT, OG_URI_CACHE_LIST, + OG_URI_EFI, OG_URI_CACHE_DELETE, OG_URI_CACHE_FETCH, OG_URI_PART_SETUP, -- cgit v1.2.3-18-g5258