Removed TFTP code update option

- Removed TFTP server firmware update ability in the UI.

Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
Change-Id: Icbeddc7a3faa262f12e85268206ae70850f37905
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index 44a63de..55ff937 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -347,7 +347,6 @@
                 "fileSource": "File source",
                 "imageFile": "Image file",
                 "startUpdate": "Start update",
-                "tftpServer": "TFTP server",
                 "workstation": "Workstation"
             }
         },
diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json
index dcf7c59..43854d3 100644
--- a/src/locales/ru-RU.json
+++ b/src/locales/ru-RU.json
@@ -347,7 +347,6 @@
                 "fileSource": "Источник файла",
                 "imageFile": "Файл образа",
                 "startUpdate": "Начать обновление",
-                "tftpServer": "TFTP сервер",
                 "workstation": "Рабочая станция"
             }
         },
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js
index f6f965f..ca3ed52 100644
--- a/src/store/modules/Operations/FirmwareStore.js
+++ b/src/store/modules/Operations/FirmwareStore.js
@@ -10,10 +10,8 @@
     hostActiveFirmwareId: null,
     applyTime: null,
     httpPushUri: null,
-    tftpAvailable: false,
   },
   getters: {
-    isTftpUploadAvailable: (state) => state.tftpAvailable,
     isSingleFileUploadEnabled: (state) => state.hostFirmware.length === 0,
     activeBmcFirmware: (state) => {
       return state.bmcFirmware.find(
@@ -43,8 +41,6 @@
     setHostFirmware: (state, firmware) => (state.hostFirmware = firmware),
     setApplyTime: (state, applyTime) => (state.applyTime = applyTime),
     setHttpPushUri: (state, httpPushUri) => (state.httpPushUri = httpPushUri),
-    setTftpUploadAvailable: (state, tftpAvailable) =>
-      (state.tftpAvailable = tftpAvailable),
   },
   actions: {
     async getFirmwareInformation({ dispatch }) {
@@ -111,16 +107,9 @@
         .then(({ data }) => {
           const applyTime =
             data.HttpPushUriOptions.HttpPushUriApplyTime.ApplyTime;
-          const allowableActions =
-            data?.Actions?.['#UpdateService.SimpleUpdate']?.[
-              'TransferProtocol@Redfish.AllowableValues'
-            ];
           commit('setApplyTime', applyTime);
           const httpPushUri = data.HttpPushUri;
           commit('setHttpPushUri', httpPushUri);
-          if (allowableActions?.includes('TFTP')) {
-            commit('setTftpUploadAvailable', true);
-          }
         })
         .catch((error) => console.log(error));
     },
@@ -134,21 +123,6 @@
           throw new Error(i18n.t('pageFirmware.toast.errorUpdateFirmware'));
         });
     },
-    async uploadFirmwareTFTP(fileAddress) {
-      const data = {
-        TransferProtocol: 'TFTP',
-        ImageURI: fileAddress,
-      };
-      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 ac4b23f..4c302df 100644
--- a/src/views/Operations/Firmware/FirmwareFormUpdate.vue
+++ b/src/views/Operations/Firmware/FirmwareFormUpdate.vue
@@ -2,21 +2,8 @@
   <div>
     <div class="form-background p-3">
       <b-form @submit.prevent="onSubmitUpload">
-        <b-form-group
-          v-if="isTftpUploadAvailable"
-          :label="$t('pageFirmware.form.updateFirmware.fileSource')"
-          :disabled="isPageDisabled"
-        >
-          <b-form-radio v-model="isWorkstationSelected" :value="true">
-            {{ $t('pageFirmware.form.updateFirmware.workstation') }}
-          </b-form-radio>
-          <b-form-radio v-model="isWorkstationSelected" :value="false">
-            {{ $t('pageFirmware.form.updateFirmware.tftpServer') }}
-          </b-form-radio>
-        </b-form-group>
-
         <!-- Workstation Upload -->
-        <template v-if="isWorkstationSelected">
+        <template>
           <b-form-group
             :label="$t('pageFirmware.form.updateFirmware.imageFile')"
             label-for="image-file"
@@ -37,25 +24,6 @@
           </b-form-group>
         </template>
 
-        <!-- TFTP Server Upload -->
-        <template v-else>
-          <b-form-group
-            :label="$t('pageFirmware.form.updateFirmware.fileAddress')"
-            label-for="tftp-address"
-          >
-            <b-form-input
-              id="tftp-address"
-              v-model="tftpFileAddress"
-              type="text"
-              :state="getValidationState($v.tftpFileAddress)"
-              :disabled="isPageDisabled"
-              @input="$v.tftpFileAddress.$touch()"
-            />
-            <b-form-invalid-feedback role="alert">
-              {{ $t('global.form.fieldRequired') }}
-            </b-form-invalid-feedback>
-          </b-form-group>
-        </template>
         <b-btn
           data-test-id="firmware-button-startUpdate"
           type="submit"
@@ -73,7 +41,7 @@
 </template>
 
 <script>
-import { requiredIf } from 'vuelidate/lib/validators';
+import { required } from 'vuelidate/lib/validators';
 
 import BVToastMixin from '@/components/Mixins/BVToastMixin';
 import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin';
@@ -99,36 +67,15 @@
   data() {
     return {
       loading,
-      isWorkstationSelected: true,
       file: null,
-      tftpFileAddress: null,
       isServerPowerOffRequired:
         process.env.VUE_APP_SERVER_OFF_REQUIRED === 'true',
     };
   },
-  computed: {
-    isTftpUploadAvailable() {
-      return this.$store.getters['firmware/isTftpUploadAvailable'];
-    },
-  },
-  watch: {
-    isWorkstationSelected: function () {
-      this.$v.$reset();
-      this.file = null;
-      this.tftpFileAddress = null;
-    },
-  },
   validations() {
     return {
       file: {
-        required: requiredIf(function () {
-          return this.isWorkstationSelected;
-        }),
-      },
-      tftpFileAddress: {
-        required: requiredIf(function () {
-          return !this.isWorkstationSelected;
-        }),
+        required,
       },
     };
   },
@@ -149,11 +96,7 @@
         title: this.$t('pageFirmware.toast.updateStarted'),
         timestamp: true,
       });
-      if (this.isWorkstationSelected) {
-        this.dispatchWorkstationUpload(timerId);
-      } else {
-        this.dispatchTftpUpload(timerId);
-      }
+      this.dispatchWorkstationUpload(timerId);
     },
     dispatchWorkstationUpload(timerId) {
       this.$store
@@ -164,15 +107,6 @@
           clearTimeout(timerId);
         });
     },
-    dispatchTftpUpload(timerId) {
-      this.$store
-        .dispatch('firmware/uploadFirmwareTFTP', this.tftpFileAddress)
-        .catch(({ message }) => {
-          this.endLoader();
-          this.errorToast(message);
-          clearTimeout(timerId);
-        });
-    },
     onSubmitUpload() {
       this.$v.$touch();
       if (this.$v.$invalid) return;