diff options
author | jason westover <jwestover@nvidia.com> | 2024-09-13 01:18:59 +0300 |
---|---|---|
committer | jason westover <jwestover@nvidia.com> | 2024-09-13 01:33:58 +0300 |
commit | ccf5c5c83260aec703859f6e65075b3365897518 (patch) | |
tree | 8b8289178100cb0140066b6e7c958a86c37f3dbd | |
parent | e2c716a91f3cf130427600c26ae58de0f9750f2a (diff) | |
download | webui-vue-ccf5c5c83260aec703859f6e65075b3365897518.tar.xz |
Add default Target to MultipartHttpPush
When no targets are provided, webui will now default to the BMC:
i.e. "/redfish/v1/Managers/bmc"
The current version of bmcweb requires the Targets parameter.
bmcweb will be updated for multipart to match the behavior of
simpleupdate:
if Targets is empty or missing, default to the BMC.
Also, the fwupdate page will be updated soon to allow the
selection of Targets from the FirmwareInventory list.
This should be a temp webui fix until we are comfortable with
the upcoming changes to bmcweb.
Change-Id: I630dcb40068b98aad8e1d276d17fe9af4793e788
Signed-off-by: jason westover <jwestover@nvidia.com>
-rw-r--r-- | src/store/modules/Operations/FirmwareStore.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js index 6c216da8..64bd640f 100644 --- a/src/store/modules/Operations/FirmwareStore.js +++ b/src/store/modules/Operations/FirmwareStore.js @@ -141,7 +141,13 @@ const FirmwareStore = { const formData = new FormData(); formData.append('UpdateFile', image); let params = {}; - if (targets != null && targets.length > 0) params.Targets = targets; + if (targets != null && targets.length > 0) { + params.Targets = targets; + } else { + // TODO: Should be OK to leave Targets out, remove this clause + // when bmcweb is updated + params.Targets = [`${await this.dispatch('global/getBmcPath')}`]; + } formData.append('UpdateParameters', JSON.stringify(params)); return await api .post(state.multipartHttpPushUri, formData, { |