From 6b424f998068f2336d0f2c0d8b806124554855e8 Mon Sep 17 00:00:00 2001 From: greenfil Date: Fri, 10 Mar 2023 10:47:41 +0300 Subject: Added the use of HttpPushUri According to the Redfish specification, the address to update the firmware is set in redfish/v1/UpdateService with the HttpPushUri variable. ``` https://github.com/openbmc/bmcweb/commit/4dc23f3fb6c9a7cef84658f8ab3b703d29ec7d57 ``` Change-Id: I29566a8ab2d06b658ab62f61c34be00fbbba0571 Signed-off-by: greenfil --- src/store/modules/Operations/FirmwareStore.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/store/modules/Operations') diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js index c6639ff7..afc12e92 100644 --- a/src/store/modules/Operations/FirmwareStore.js +++ b/src/store/modules/Operations/FirmwareStore.js @@ -9,6 +9,7 @@ const FirmwareStore = { bmcActiveFirmwareId: null, hostActiveFirmwareId: null, applyTime: null, + httpPushUri: null, tftpAvailable: false, }, getters: { @@ -41,6 +42,7 @@ const FirmwareStore = { setBmcFirmware: (state, firmware) => (state.bmcFirmware = firmware), setHostFirmware: (state, firmware) => (state.hostFirmware = firmware), setApplyTime: (state, applyTime) => (state.applyTime = applyTime), + setHttpPushUri: (state, httpPushUri) => (state.httpPushUri = httpPushUri), setTftpUploadAvailable: (state, tftpAvailable) => (state.tftpAvailable = tftpAvailable), }, @@ -113,8 +115,9 @@ const FirmwareStore = { data?.Actions?.['#UpdateService.SimpleUpdate']?.[ 'TransferProtocol@Redfish.AllowableValues' ]; - commit('setApplyTime', applyTime); + const httpPushUri = data.HttpPushUri; + commit('setHttpPushUri', httpPushUri); if (allowableActions?.includes('TFTP')) { commit('setTftpUploadAvailable', true); } @@ -141,7 +144,7 @@ const FirmwareStore = { await dispatch('setApplyTimeImmediate'); } return await api - .post('/redfish/v1/UpdateService', image, { + .post(state.httpPushUri, image, { headers: { 'Content-Type': 'application/octet-stream' }, }) .catch((error) => { -- cgit v1.2.3