From ed590d518b45c8d1cdc425ab3efb3e20b3b76a62 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 1 Jul 2019 14:21:16 -0400 Subject: [PATCH] Support no-image media in list list_media will now use imagename when inserted media is detected without an image. Change-Id: I72126c99650671d50c6e57405314adc1f6c45e23 --- pyghmi/redfish/command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index a4657037..b7c2b20c 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -1337,6 +1337,9 @@ class Command(object): if vminfo['Image']: imageurl = vminfo['Image'].replace('/' + vminfo['ImageName'], '') yield media.Media(vminfo['ImageName'], imageurl) + elif vminfo['Inserted'] and vminfo['ImageName']: + yield media.Media(vminfo['ImageName']) + def get_storage_configuration(self): """"Get storage configuration data