Replace fixed paths with response from API

Currently, the Redfish request used fixed URIs, modify the code to use
the BMC and System paths got from response of API calls.
For CertificateStore, since it was using the URL for constant variable
assignment, changed the constant CERTIFICATE_TYPES to method call.

Change-Id: I330b7272083e3e6993aae5705aae170b8e9a4659
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js
index 7dce231..f6f965f 100644
--- a/src/store/modules/Operations/FirmwareStore.js
+++ b/src/store/modules/Operations/FirmwareStore.js
@@ -52,18 +52,18 @@
       dispatch('getActiveBmcFirmware');
       return await dispatch('getFirmwareInventory');
     },
-    getActiveBmcFirmware({ commit }) {
+    async getActiveBmcFirmware({ commit }) {
       return api
-        .get('/redfish/v1/Managers/bmc')
+        .get(`${await this.dispatch('global/getBmcPath')}`)
         .then(({ data: { Links } }) => {
           const id = Links?.ActiveSoftwareImage['@odata.id'].split('/').pop();
           commit('setActiveBmcFirmwareId', id);
         })
         .catch((error) => console.log(error));
     },
-    getActiveHostFirmware({ commit }) {
+    async getActiveHostFirmware({ commit }) {
       return api
-        .get('/redfish/v1/Systems/system/Bios')
+        .get(`${await this.dispatch('global/getSystemPath')}/Bios`)
         .then(({ data: { Links } }) => {
           const id = Links?.ActiveSoftwareImage['@odata.id'].split('/').pop();
           commit('setActiveHostFirmwareId', id);
@@ -159,7 +159,7 @@
         },
       };
       return await api
-        .patch('/redfish/v1/Managers/bmc', data)
+        .patch(`${await this.dispatch('global/getBmcPath')}`, data)
         .catch((error) => {
           console.log(error);
           throw new Error(i18n.t('pageFirmware.toast.errorSwitchImages'));