summaryrefslogtreecommitdiff
path: root/src/store/modules/SecurityAndAccess/PoliciesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/SecurityAndAccess/PoliciesStore.js')
-rw-r--r--src/store/modules/SecurityAndAccess/PoliciesStore.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/store/modules/SecurityAndAccess/PoliciesStore.js b/src/store/modules/SecurityAndAccess/PoliciesStore.js
index e6bcfb96..f1e98b27 100644
--- a/src/store/modules/SecurityAndAccess/PoliciesStore.js
+++ b/src/store/modules/SecurityAndAccess/PoliciesStore.js
@@ -31,7 +31,7 @@ const PoliciesStore = {
actions: {
async getNetworkProtocolStatus({ commit }) {
return await api
- .get('/redfish/v1/Managers/bmc/NetworkProtocol')
+ .get(`${await this.dispatch('global/getBmcPath')}/NetworkProtocol`)
.then((response) => {
const sshProtocol = response.data.SSH.ProtocolEnabled;
const ipmiProtocol = response.data.IPMI.ProtocolEnabled;
@@ -42,7 +42,7 @@ const PoliciesStore = {
},
async getBiosStatus({ commit }) {
return await api
- .get('/redfish/v1/Systems/system/Bios')
+ .get(`${await this.dispatch('global/getSystemPath')}/Bios`)
.then((response) => {
commit('setRtadEnabled', response.data.Attributes.pvm_rtad);
commit('setVtpmEnabled', response.data.Attributes.pvm_vtpm);
@@ -66,7 +66,10 @@ const PoliciesStore = {
},
};
return await api
- .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ipmi)
+ .patch(
+ `${await this.dispatch('global/getBmcPath')}/NetworkProtocol`,
+ ipmi,
+ )
.then(() => {
if (protocolEnabled) {
return i18n.t('pagePolicies.toast.successIpmiEnabled');
@@ -92,7 +95,10 @@ const PoliciesStore = {
},
};
return await api
- .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ssh)
+ .patch(
+ `${await this.dispatch('global/getBmcPath')}/NetworkProtocol`,
+ ssh,
+ )
.then(() => {
if (protocolEnabled) {
return i18n.t('pagePolicies.toast.successSshEnabled');
@@ -113,7 +119,7 @@ const PoliciesStore = {
async saveRtadState({ commit }, updatedRtad) {
commit('setRtadEnabled', updatedRtad);
return await api
- .patch('/redfish/v1/Systems/system/Bios/Settings', {
+ .patch(`${await this.dispatch('global/getSystemPath')}/Bios/Settings`, {
Attributes: {
pvm_rtad: updatedRtad,
},
@@ -137,7 +143,7 @@ const PoliciesStore = {
async saveVtpmState({ commit }, updatedVtpm) {
commit('setVtpmEnabled', updatedVtpm);
return await api
- .patch('/redfish/v1/Systems/system/Bios/Settings', {
+ .patch(`${await this.dispatch('global/getSystemPath')}/Bios/Settings`, {
Attributes: {
pvm_vtpm: updatedVtpm,
},