summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgreenfil <mikl@greenfil.ru>2023-03-10 10:47:41 +0300
committerSivaprabu Ganesan <sivaprabug@ami.com>2023-04-15 10:22:44 +0300
commit6b424f998068f2336d0f2c0d8b806124554855e8 (patch)
treeb8d61435af5b4b59324c120930e1877f6741ec99 /src
parent7c26338edd6fdb16e72702910987a8e5fd899c10 (diff)
downloadwebui-vue-6b424f998068f2336d0f2c0d8b806124554855e8.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/store/modules/Operations/FirmwareStore.js7
1 files changed, 5 insertions, 2 deletions
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) => {