forked from openbmc/webui-vue
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove TFTP support in the GUI (#261)
- Removed code that supported TFTP server upload in the Firmware page. Signed-off-by: Nikhil Ashoka <[email protected]>
- Loading branch information
1 parent
70880e3
commit d6e3684
Showing
4 changed files
with
20 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,9 @@ const FirmwareStore = { | |
bmcActiveFirmwareId: null, | ||
hostActiveFirmwareId: null, | ||
applyTime: null, | ||
tftpAvailable: false, | ||
firmwareBootSide: null, | ||
}, | ||
getters: { | ||
isTftpUploadAvailable: (state) => state.tftpAvailable, | ||
isSingleFileUploadEnabled: (state) => state.hostFirmware.length === 0, | ||
activeBmcFirmware: (state) => { | ||
return state.bmcFirmware.find( | ||
|
@@ -45,8 +43,6 @@ const FirmwareStore = { | |
setBmcFirmware: (state, firmware) => (state.bmcFirmware = firmware), | ||
setHostFirmware: (state, firmware) => (state.hostFirmware = firmware), | ||
setApplyTime: (state, applyTime) => (state.applyTime = applyTime), | ||
setTftpUploadAvailable: (state, tftpAvailable) => | ||
(state.tftpAvailable = tftpAvailable), | ||
setFirmwareBootSide: (state, firmwareBootSide) => | ||
(state.firmwareBootSide = firmwareBootSide), | ||
}, | ||
|
@@ -124,15 +120,7 @@ const FirmwareStore = { | |
.then(({ data }) => { | ||
const applyTime = | ||
data.HttpPushUriOptions.HttpPushUriApplyTime.ApplyTime; | ||
const allowableActions = | ||
data?.Actions?.['#UpdateService.SimpleUpdate']?.[ | ||
'[email protected]' | ||
]; | ||
|
||
commit('setApplyTime', applyTime); | ||
if (allowableActions?.includes('TFTP')) { | ||
commit('setTftpUploadAvailable', true); | ||
} | ||
}) | ||
.catch((error) => console.log(error)); | ||
}, | ||
|
@@ -164,26 +152,6 @@ const FirmwareStore = { | |
throw new Error(i18n.t('pageFirmware.toast.errorUploadFirmware')); | ||
}); | ||
}, | ||
async uploadFirmwareTFTP({ state, dispatch }, 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', | ||
data | ||
) | ||
.catch((error) => { | ||
console.log(error); | ||
throw new Error(i18n.t('pageFirmware.toast.errorUpdateFirmware')); | ||
}); | ||
}, | ||
async switchBmcFirmwareAndReboot({ getters }) { | ||
const backupLocation = getters.backupBmcFirmware.location; | ||
const data = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters