Skip to content

Commit

Permalink
Add default Target to MultipartHttpPush
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
j-westover committed Sep 12, 2024
1 parent e2c716a commit ccf5c5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/store/modules/Operations/FirmwareStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit ccf5c5c

Please sign in to comment.