:param host: host name
"""
+ out, err, code = self._run_cephadm(host, '', 'check-host', [],
+ error_ok=True, no_fsid=True)
+ if code:
+ raise OrchestratorError('New host %s failed check: %s' % (host, err))
+
self.inventory[host] = {}
self._save_inventory()
self.inventory_cache[host] = orchestrator.OutdatableData()
assert new_mon.startswith('mon.')
assert new_mon != 'mon.a'
- def test_host(self, cephadm_module):
+ @mock.patch("cephadm.module.CephadmOrchestrator._get_connection")
+ @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('[]'))
+ def test_host(self, _get_connection, cephadm_module):
with self._with_host(cephadm_module, 'test'):
assert self._wait(cephadm_module, cephadm_module.get_hosts()) == [InventoryNode('test')]
c = cephadm_module.get_hosts()