Wrapper around :func:`~mgr_module.MgrModule.mon_command`, but raises, if ``retval != 0``.
(self, cmd_dict: dict, inbuf: Optional[str] = None)
| 1822 | return self._ceph_get_daemon_status(svc_type, svc_id) |
| 1823 | |
| 1824 | def check_mon_command(self, cmd_dict: dict, inbuf: Optional[str] = None) -> HandleCommandResult: |
| 1825 | """ |
| 1826 | Wrapper around :func:`~mgr_module.MgrModule.mon_command`, but raises, |
| 1827 | if ``retval != 0``. |
| 1828 | """ |
| 1829 | |
| 1830 | r = HandleCommandResult(*self.mon_command(cmd_dict, inbuf)) |
| 1831 | if r.retval: |
| 1832 | raise MonCommandFailed(f'{cmd_dict["prefix"]} failed: {r.stderr} retval: {r.retval}') |
| 1833 | return r |
| 1834 | |
| 1835 | def mon_command(self, cmd_dict: dict, inbuf: Optional[str] = None) -> Tuple[int, str, str]: |
| 1836 | """ |