diff options
Diffstat (limited to 'src/store/modules/Control')
-rw-r--r-- | src/store/modules/Control/ControlStore.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/store/modules/Control/ControlStore.js b/src/store/modules/Control/ControlStore.js new file mode 100644 index 00000000..f6415771 --- /dev/null +++ b/src/store/modules/Control/ControlStore.js @@ -0,0 +1,22 @@ +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.toastMessages.successRebootStart')) + .catch(error => { + console.log(error); + throw new Error( + i18n.t('pageRebootBmc.toastMessages.errorRebootStart') + ); + }); + } + } +}; + +export default ControlStore; |