diff --git a/ironic/drivers/modules/redfish/management.py b/ironic/drivers/modules/redfish/management.py index 64e2df002d..289c4755d7 100644 --- a/ironic/drivers/modules/redfish/management.py +++ b/ironic/drivers/modules/redfish/management.py @@ -1346,7 +1346,8 @@ class RedfishManagement(base.ManagementInterface): :param image_url: URL of the image to attach, HTTP or HTTPS. """ - redfish_boot.insert_vmedia(task, image_url, device_type) + redfish_boot.insert_vmedia(task, image_url, + BOOT_DEVICE_MAP_REV[device_type]) @task_manager.require_exclusive_lock def detach_virtual_media(self, task, device_types=None): @@ -1362,4 +1363,5 @@ class RedfishManagement(base.ManagementInterface): redfish_boot.eject_vmedia(task) else: for device_type in device_types: - redfish_boot.eject_vmedia(task, device_type) + redfish_boot.eject_vmedia(task, + BOOT_DEVICE_MAP_REV[device_type]) diff --git a/ironic/releasenotes/notes/fix-device_type-redfish-advmedia-dff448c2f9085a47.yaml b/ironic/releasenotes/notes/fix-device_type-redfish-advmedia-dff448c2f9085a47.yaml new file mode 100644 index 0000000000..99c520bc3f --- /dev/null +++ b/ironic/releasenotes/notes/fix-device_type-redfish-advmedia-dff448c2f9085a47.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes an issue in Redfish generic attach and detach virtual media + where the virtual media devices were not recognized causing a + failure when attaching or detaching a single virtual media device. +