]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
orch/cephadm: implement `ceph orch hardware` command
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 26 Oct 2023 14:34:10 +0000 (14:34 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 15:15:27 +0000 (15:15 +0000)
commit04605d8973f710766999eccfefcbf5cb901af036
tree54210259b142ee2e33a2f87fcb2776bcdd5f8173
parent073a05c7192674bc04c19bea7e06abe41b0d1a81
orch/cephadm: implement `ceph orch hardware` command

This adds a first implementation of the `ceph orch hardware` CLI.

Usage:

```
ceph orch hardware status [<hostname>] [--category <value>]
```

Omitting the `[<hostname>]` argument will generate a report for all hosts.
The default for argument `[--category]` is `summary`.

Example with `--category` :

```
+------------+-------------+-------+--------+---------+
|    HOST    |     NAME    | SPEED | STATUS |  STATE  |
+------------+-------------+-------+--------+---------+
| ceph-00001 |   eno8303   |   0   |   OK   | Enabled |
| ceph-00001 |   eno8403   |   0   |   OK   | Enabled |
| ceph-00001 | eno12399np0 | 10000 |   OK   | Enabled |
| ceph-00001 | eno12409np1 | 10000 |   OK   | Enabled |
| ceph-00001 |    bond0    | 10000 |   OK   | Enabled |
+------------+-------------+-------+--------+---------+
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 1665156eea9e57e533a2ded26a8f7b37df68f5c5)
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/orchestrator/_interface.py
src/pybind/mgr/orchestrator/module.py