]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/cephadm_cases/test_cli.py
3 from tasks
.mgr
.mgr_test_case
import MgrTestCase
5 log
= logging
.getLogger(__name__
)
8 class TestCephadmCLI(MgrTestCase
):
10 return self
.mgr_cluster
.mon_manager
.raw_cluster_cmd(*args
)
12 def _orch_cmd(self
, *args
):
13 return self
._cmd
("orch", *args
)
16 super(TestCephadmCLI
, self
).setUp()
20 to prevent oddities like
23 ... from collections import OrderedDict
24 ... assert yaml.dump(OrderedDict()) == '!!python/object/apply:collections.OrderedDict\\n- []\\n'
26 out
= self
._orch
_cmd
('device', 'ls', '--format', 'yaml')
27 self
.assertNotIn('!!python', out
)
29 out
= self
._orch
_cmd
('host', 'ls', '--format', 'yaml')
30 self
.assertNotIn('!!python', out
)
32 out
= self
._orch
_cmd
('ls', '--format', 'yaml')
33 self
.assertNotIn('!!python', out
)
35 out
= self
._orch
_cmd
('ps', '--format', 'yaml')
36 self
.assertNotIn('!!python', out
)
38 out
= self
._orch
_cmd
('status', '--format', 'yaml')
39 self
.assertNotIn('!!python', out
)
42 self
._orch
_cmd
('pause')
43 self
.wait_for_health('CEPHADM_PAUSED', 30)
44 self
._orch
_cmd
('resume')
45 self
.wait_for_health_clear(30)
47 def test_daemon_restart(self
):
48 self
._orch
_cmd
('daemon', 'stop', 'osd.0')
49 self
.wait_for_health('OSD_DOWN', 30)
50 self
._orch
_cmd
('daemon', 'start', 'osd.0')
51 self
.wait_for_health_clear(30)
52 self
._orch
_cmd
('daemon', 'restart', 'osd.0')