def blink_device_light(self, ident_fault, on, locs):
@async_map_completion
- def blink(host, dev):
+ def blink(host, dev, path):
cmd = [
'lsmcli',
'local-disk-%s-led-%s' % (
ident_fault,
'on' if on else 'off'),
- '--path', dev,
+ '--path', path or dev,
]
out, err, code = self._run_cephadm(
host, 'osd', 'shell', ['--'] + cmd,
@mock.patch("cephadm.module.CephadmOrchestrator._get_connection")
def test_blink_device_light(self, _send_command, _get_connection, cephadm_module):
with self._with_host(cephadm_module, 'test'):
- c = cephadm_module.blink_device_light('ident', True, [('test', '')])
+ c = cephadm_module.blink_device_light('ident', True, [('test', '', '')])
assert self._wait(cephadm_module, c) == ['Set ident light for test: on']
return self.name == other.name and self.devices == other.devices
-class DeviceLightLoc(namedtuple('DeviceLightLoc', ['host', 'dev'])):
+class DeviceLightLoc(namedtuple('DeviceLightLoc', ['host', 'dev', 'path'])):
"""
Describes a specific device on a specific host. Used for enabling or disabling LEDs
on devices.