blob: f6415771f99609b37eeabc87dbe5805af02233e9 [file] [log] [blame]
Yoshie Muranakac11d3892020-02-19 08:07:40 -08001import api from '../../api';
2import i18n from '../../../i18n';
3
4const ControlStore = {
5 namespaced: true,
6 actions: {
7 async rebootBmc() {
8 const data = { ResetType: 'GracefulRestart' };
9 return await api
10 .post('/redfish/v1/Managers/bmc/Actions/Manager.Reset', data)
11 .then(() => i18n.t('pageRebootBmc.toastMessages.successRebootStart'))
12 .catch(error => {
13 console.log(error);
14 throw new Error(
15 i18n.t('pageRebootBmc.toastMessages.errorRebootStart')
16 );
17 });
18 }
19 }
20};
21
22export default ControlStore;