airshipctl/pkg/remote/redfish
Alexander Noskov 068718e07d Proper error handling with Sushy emulator
This change adds a more informative error message in case of using airshipctl
with a Sushy emulator.

In the current implementation, by executing `airshipctl baremetal powerstatus`
command with invalid BMH configuration for example, returns:
redfish client encountered an error: BMC responded '500 INTERNAL SERVER ERROR'.

After this change the output looks like this:
redfish client encountered an error: BMC responded '500 INTERNAL SERVER ERROR'.
BMC responded: 'Error finding domain by name/UUID "air-ephemeral1" at libvirt
URI qemu:///system": Domain not found: no domain with matching name 'air-ephemeral1''

In case of using airshipctl with baremetal BMC, extendedInfo contains a valid
error message, so there are no issues.

Relates-To: #320

Change-Id: I437f50d5df4b0561f352804f269b0319badcc755
2020-08-26 15:22:33 -05:00
..
vendors/dell Make remote parameters configurable 2020-05-08 17:23:59 +04:00
client.go Make remote parameters configurable 2020-05-08 17:23:59 +04:00
client_test.go Switch to Ubuntu focal (20.04) based image 2020-08-13 13:11:25 -05:00
constants.go Add Dell Redfish client 2020-04-17 19:51:24 +00:00
errors.go Remove AirshipError 2020-05-28 14:22:44 -05:00
utils.go Proper error handling with Sushy emulator 2020-08-26 15:22:33 -05:00
utils_test.go Decode Redfish error responses as raw JSON 2020-04-27 13:35:17 +00:00