Async model updates
[osm/N2VC.git] / juju / machine.py
1 from . import model
2
3
4 class Machine(model.ModelEntity):
5 def run(self, command, timeout=None):
6 """Run command on this machine.
7
8 :param str command: The command to run
9 :param int timeout: Time to wait before command is considered failed
10
11 """
12 pass
13
14 def scp(
15 self, source_path, user=None, destination_path=None, proxy=False,
16 scp_opts=None):
17 """Transfer files to this machine.
18
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
22 remote machine
23 :param bool proxy: Proxy through the Juju API server
24 :param str scp_opts: Additional options to the `scp` command
25
26 """
27 pass
28
29 def ssh(
30 self, command, user=None, proxy=False, ssh_opts=None):
31 """Execute a command over SSH on this machine.
32
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
37
38 """
39 pass
40
41 def status_history(self, num=20, utc=False):
42 """Get status history for this machine.
43
44 :param int num: Size of history backlog
45 :param bool utc: Display time as UTC in RFC3339 format
46
47 """
48 pass