a7cb6a9fd97e2178a054da89fd3bda628e52c178
4 class Machine(model
.ModelEntity
):
5 def run(self
, command
, timeout
=None):
6 """Run command on this machine.
8 :param str command: The command to run
9 :param int timeout: Time to wait before command is considered failed
15 self
, source_path
, user
=None, destination_path
=None, proxy
=False,
17 """Transfer files to this machine.
19 :param str source_path: Path of file(s) to transfer
20 :param str user: Remote username
21 :param str destination_path: Destination of transferred files on
23 :param bool proxy: Proxy through the Juju API server
24 :param str scp_opts: Additional options to the `scp` command
30 self
, command
, user
=None, proxy
=False, ssh_opts
=None):
31 """Execute a command over SSH on this machine.
33 :param str command: Command to execute
34 :param str user: Remote username
35 :param bool proxy: Proxy through the Juju API server
36 :param str ssh_opts: Additional options to the `ssh` command
41 def status_history(self
, num
=20, utc
=False):
42 """Get status history for this machine.
44 :param int num: Size of history backlog
45 :param bool utc: Display time as UTC in RFC3339 format