From 363d1ae113baa3e813e0dfb31179694da2019861 Mon Sep 17 00:00:00 2001 From: Nikhil Ashoka Date: Thu, 18 Jul 2024 19:33:57 +0530 Subject: [PATCH] Remove TFTP support in the GUI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed code that supported TFTP server upload in the Firmware
page.
 Signed-off-by: Nikhil Ashoka --- .env.ibm | 1 - src/locales/en-US.json | 2 - src/store/modules/Operations/FirmwareStore.js | 32 ----- .../Firmware/FirmwareFormUpdate.vue | 117 +++--------------- 4 files changed, 20 insertions(+), 132 deletions(-) diff --git a/.env.ibm b/.env.ibm index 2322104279..8e49efba9b 100644 --- a/.env.ibm +++ b/.env.ibm @@ -7,5 +7,4 @@ CUSTOM_APP_NAV=true CUSTOM_ROUTER=true CUSTOM_STORE=true VUE_APP_SERVER_OFF_REQUIRED=true -VUE_APP_TFTP_SERVER=false VUE_APP_ACF_UPLOAD_REQUIRED=true diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 2d2d03b596..38132fca45 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -766,8 +766,6 @@ "imageFile": "Image file", "manageAccessKeys": "Manage access keys", "startUpdate": "Start update", - "tftpServer": "TFTP server", - "tftpServerInfo": "/.tar", "workstation": "Workstation" } }, diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js index f7d9110efe..0b38663f5b 100644 --- a/src/store/modules/Operations/FirmwareStore.js +++ b/src/store/modules/Operations/FirmwareStore.js @@ -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']?.[ - 'TransferProtocol@Redfish.AllowableValues' - ]; - 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 = { diff --git a/src/views/Operations/Firmware/FirmwareFormUpdate.vue b/src/views/Operations/Firmware/FirmwareFormUpdate.vue index 90ad066109..7e23a37475 100644 --- a/src/views/Operations/Firmware/FirmwareFormUpdate.vue +++ b/src/views/Operations/Firmware/FirmwareFormUpdate.vue @@ -2,68 +2,26 @@
+ - - {{ $t('pageFirmware.form.updateFirmware.workstation') }} - - - {{ $t('pageFirmware.form.updateFirmware.tftpServer') }} - - - - - - - - - + + +