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 <mikl@greenfil.ru>
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js
index c6639ff..afc12e9 100644
--- a/src/store/modules/Operations/FirmwareStore.js
+++ b/src/store/modules/Operations/FirmwareStore.js
@@ -9,6 +9,7 @@
bmcActiveFirmwareId: null,
hostActiveFirmwareId: null,
applyTime: null,
+ httpPushUri: null,
tftpAvailable: false,
},
getters: {
@@ -41,6 +42,7 @@
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 @@
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 @@
await dispatch('setApplyTimeImmediate');
}
return await api
- .post('/redfish/v1/UpdateService', image, {
+ .post(state.httpPushUri, image, {
headers: { 'Content-Type': 'application/octet-stream' },
})
.catch((error) => {