MCPcopy Create free account
hub / github.com/ceph/ceph / _shell_command

Function _shell_command

qa/tasks/cephadm.py:1606–1613  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1604
1605
1606def _shell_command(obj):
1607 if isinstance(obj, str):
1608 return obj, None
1609 if isinstance(obj, dict):
1610 cmd = obj['cmd']
1611 stdin = obj.get('stdin', None)
1612 return cmd, stdin
1613 raise ValueError(f'invalid command item: {obj!r}')
1614
1615
1616def apply(ctx, config):

Callers 1

shellFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected