Skip to content

Commit

Permalink
remove setApplyTimeImmediate and its usage
Browse files Browse the repository at this point in the history
BMCWeb is dropping the support for patch for ApplyOptions, hence remove
the setApplyTimeImmediate and its corresponding usage from webui. The
related patch from bmcweb is as under -
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72150

Change-Id: I4ef64485103db843e1280bc5b8bd8be63813c368
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
  • Loading branch information
jagpalgill committed Jun 18, 2024
1 parent 620e646 commit ccb71f0
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions src/store/modules/Operations/FirmwareStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,7 @@ const FirmwareStore = {
})
.catch((error) => console.log(error));
},
setApplyTimeImmediate({ commit }) {
const data = {
HttpPushUriOptions: {
HttpPushUriApplyTime: {
ApplyTime: 'Immediate',
},
},
};
return api
.patch('/redfish/v1/UpdateService', data)
.then(() => commit('setApplyTime', 'Immediate'))
.catch((error) => console.log(error));
},
async uploadFirmware({ state, dispatch }, image) {
if (state.applyTime !== 'Immediate') {
// ApplyTime must be set to Immediate before making
// request to update firmware
await dispatch('setApplyTimeImmediate');
}
async uploadFirmware({ state }, image) {
return await api
.post(state.httpPushUri, image, {
headers: { 'Content-Type': 'application/octet-stream' },
Expand All @@ -152,16 +134,11 @@ const FirmwareStore = {
throw new Error(i18n.t('pageFirmware.toast.errorUpdateFirmware'));
});
},
async uploadFirmwareTFTP({ state, dispatch }, fileAddress) {
async uploadFirmwareTFTP(fileAddress) {
const data = {
TransferProtocol: 'TFTP',
ImageURI: fileAddress,
};
if (state.applyTime !== 'Immediate') {
// ApplyTime must be set to Immediate before making
// request to update firmware
await dispatch('setApplyTimeImmediate');
}
return await api
.post(
'/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate',
Expand Down

0 comments on commit ccb71f0

Please sign in to comment.