if not model.info:
await utils.run_with_interrupt(model.get_info(),
model._watch_stopping,
- model.loop)
+ loop=model.loop)
if model._watch_stopping.is_set():
return
if model.info.agent_version < client.Number.from_json('2.2.3'):
full_status = await utils.run_with_interrupt(model.get_status(),
model._watch_stopping,
- model.loop)
+ loop=model.loop)
if model._watch_stopping.is_set():
return
:param str destination: Remote destination of transferred files
:param str user: Remote username
:param bool proxy: Proxy through the Juju API server
- :param str scp_opts: Additional options to the `scp` command
+ :param scp_opts: Additional options to the `scp` command
+ :type scp_opts: str or list
"""
if proxy:
raise NotImplementedError('proxy option is not implemented')
:param str destination: Local destination of transferred files
:param str user: Remote username
:param bool proxy: Proxy through the Juju API server
- :param str scp_opts: Additional options to the `scp` command
+ :param scp_opts: Additional options to the `scp` command
+ :type scp_opts: str or list
"""
if proxy:
raise NotImplementedError('proxy option is not implemented')
'-i', os.path.expanduser('~/.local/share/juju/ssh/juju_id_rsa'),
'-o', 'StrictHostKeyChecking=no',
'-q',
- '-B',
- source, destination
+ '-B'
]
- cmd += scp_opts.split()
+ cmd.extend(scp_opts.split() if isinstance(scp_opts, str) else scp_opts)
+ cmd.extend([source, destination])
loop = self.model.loop
process = await asyncio.create_subprocess_exec(*cmd, loop=loop)
await process.wait()