blob: 9b2e4592a9640b0274851e2583bb3be524acc239 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import api from '../../api';
import i18n from '../../../i18n';
const ControlStore = {
namespaced: true,
actions: {
async rebootBmc() {
const data = { ResetType: 'GracefulRestart' };
return await api
.post('/redfish/v1/Managers/bmc/Actions/Manager.Reset', data)
.then(() => i18n.t('pageRebootBmc.toast.successRebootStart'))
.catch(error => {
console.log(error);
throw new Error(i18n.t('pageRebootBmc.toast.errorRebootStart'));
});
}
}
};
export default ControlStore;
|