'runtime': True,
},
]
- NATIVE_OPTIONS = []
+ NATIVE_OPTIONS = [] # type: List[dict]
def __init__(self, *args, **kwargs):
super(OrchestratorCli, self).__init__(*args, **kwargs)
"name=refresh,type=CephBool,req=false",
'List devices on a node')
def _list_devices(self, host=None, format='plain', refresh=False):
- # type: (List[str], str, bool) -> HandleCommandResult
+ # type: (Optional[List[str]], str, bool) -> HandleCommandResult
"""
Provide information about storage devices present in cluster hosts
table._align['SIZE'] = 'r'
table.left_padding_width = 0
table.right_padding_width = 1
- for host in completion.result: # type: orchestrator.InventoryNode
- for d in host.devices.devices: # type: Device
+ for host_ in completion.result: # type: orchestrator.InventoryNode
+ for d in host_.devices.devices: # type: Device
table.add_row(
(
- host.name,
+ host_.name,
d.path,
d.human_readable_type,
format_bytes(d.sys_api.get('size', 0), 5, colored=False),
"name=svc_arg,type=CephString,req=false",
'Create an OSD service. Either --svc_arg=host:drives or -i <drive_group>')
def _create_osd(self, svc_arg=None, inbuf=None):
- # type: (str, str) -> HandleCommandResult
+ # type: (Optional[str], Optional[str]) -> HandleCommandResult
"""Create one or more OSDs"""
usage = """
assert self._select_orchestrator() is None
self._set_backend(old_orch)
- e = self.remote('selftest', 'remote_from_orchestrator_cli_self_test', "ZeroDivisionError")
+ e1 = self.remote('selftest', 'remote_from_orchestrator_cli_self_test', "ZeroDivisionError")
try:
- orchestrator.raise_if_exception(e)
+ orchestrator.raise_if_exception(e1)
assert False
except ZeroDivisionError as e:
assert e.args == ('hello', 'world')
- e = self.remote('selftest', 'remote_from_orchestrator_cli_self_test', "OrchestratorError")
+ e2 = self.remote('selftest', 'remote_from_orchestrator_cli_self_test', "OrchestratorError")
try:
- orchestrator.raise_if_exception(e)
+ orchestrator.raise_if_exception(e2)
assert False
except orchestrator.OrchestratorError as e:
assert e.args == ('hello', 'world')