injected_argv = ['ls']
- For reading stdin from the '--config-and-json -' argument,
+ For reading stdin from the '--config-json -' argument,
injected_stdin = '...'
"""
def get_config_and_keyring():
# type: () -> Tuple[str, str]
- if args.config_and_keyring:
- if args.config_and_keyring == '-':
+ if 'config_json' in args and args.config_json:
+ if args.config_json == '-':
try:
j = injected_stdin # type: ignore
except NameError:
j = sys.stdin.read()
else:
- with open(args.config_and_keyring, 'r') as f:
+ with open(args.config_json, 'r') as f:
j = f.read()
d = json.loads(j)
config = d.get('config')
tmp_config = None
tmp_keyring = None
- if args.config_and_keyring:
- # note: this will always pull from args.config_and_keyring (we
+ if args.config_json:
+ # note: this will always pull from args.config_json (we
# require it) and never args.config or args.keyring.
(config, keyring) = get_config_and_keyring()
'--fsid',
help='cluster FSID')
parser_ceph_volume.add_argument(
- '--config-and-keyring',
+ '--config-json',
help='JSON file with config and (client.bootrap-osd) key')
parser_ceph_volume.add_argument(
'command', nargs='+',
parser_deploy.add_argument(
'--key',
help='key for new daemon')
- parser_deploy.add_argument(
- '--config-and-keyring',
- help='JSON file with config and keyrings for the daemon and crash agent')
parser_deploy.add_argument(
'--osd-fsid',
help='OSD uuid, if creating an OSD container')
before_osd_uuid_map = self.get_osd_uuid_map(only_up=True)
split_cmd = cmd.split(' ')
- _cmd = ['--config-and-keyring', '-', '--']
+ _cmd = ['--config-json', '-', '--']
_cmd.extend(split_cmd)
out, err, code = self._run_cephadm(
host, 'osd', 'ceph-volume',
'config': config,
'keyring': keyring,
}
- extra_args.extend(['--config-and-keyring', '-'])
+ extra_args.extend(['--config-json', '-'])
# osd deployments needs an --osd-uuid arg
if daemon_type == 'osd':