From 98d22ffabc797935c03bda1b22d21ce0b81efc19 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 3 May 2022 08:29:43 -0400 Subject: [PATCH] Add a utility to induce an inventory --- misc/forceinventory.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 misc/forceinventory.py diff --git a/misc/forceinventory.py b/misc/forceinventory.py new file mode 100644 index 00000000..c7f68195 --- /dev/null +++ b/misc/forceinventory.py @@ -0,0 +1,9 @@ +import pyghmi.ipmi.command as cmd +import sys +import os +# alternatively, the following ipmi raw sequence: +# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69 0x6e 0x76 0x65 0x6e 0x74 0x6f 0x72 0x79 0x11 0x1 + +c = cmd.Command(sys.argv[1], os.environ['XCCUSER'], os.environ['XCCPASS'], verifycallback=lambda x: True) +c.oem_init() +c._oem.immhandler.set_property('/v2/ibmc/uefi/force-inventory', 1)