From 6c1f7dd0795592963268e1631d4a4afb476eb9fc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 2 Dec 2019 15:40:45 -0500 Subject: [PATCH] Add a 'not ready' for overview fetch If the fetch does not have 'Systems', it seems to mean the redfish subsystem is not ready yet on the target BMC. Change-Id: I6935ab31d090185e1bcc43364e8fc306f5635975 --- pyghmi/redfish/command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index ed63eac0..fb912b06 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -246,6 +246,8 @@ class Command(object): self.username = userid self.password = password self.wc.set_header('Content-Type', 'application/json') + if 'Systems' not in overview: + raise exc.PyghmiException('Redfish not ready') systems = overview['Systems']['@odata.id'] res = self.wc.grab_json_response_with_status(systems) if res[1] == 401: