Remainder of params/docstrings
[osm/N2VC.git] / juju / unit.py
1 class Unit(object):
2 def add_storage(self, name, constraints=None):
3 """Add unit storage dynamically.
4
5 :param str name: Storage name, as specified by the charm
6 :param str constraints: Comma-separated list of constraints in the
7 form 'POOL,COUNT,SIZE'
8
9 """
10 pass
11
12 def collect_metrics(self):
13 """Collect metrics on this unit.
14
15 """
16 pass
17
18 def destroy(self):
19 """Destroy this unit.
20
21 """
22 pass
23 remove = destroy
24
25 def get_resources(self, details=False):
26 """Return resources for this unit.
27
28 :param bool details: Include detailed info about resources used by each
29 unit
30
31 """
32 pass
33
34 def resolved(self, retry=False):
35 """Mark unit errors resolved.
36
37 :param bool retry: Re-execute failed hooks
38
39 """
40 pass
41
42 def run(self, command, timeout=None):
43 """Run command on this unit.
44
45 :param str command: The command to run
46 :param int timeout: Time to wait before command is considered failed
47
48 """
49 pass
50
51 def run_action(self, action_name, **params):
52 """Run action on this unit.
53
54 :param str action_name: Name of action to run
55 :param \*\*params: Action parameters
56
57 """
58 pass
59
60 def scp(
61 self, source_path, user=None, destination_path=None, proxy=False,
62 scp_opts=None):
63 """Transfer files to this unit.
64
65 :param str source_path: Path of file(s) to transfer
66 :param str user: Remote username
67 :param str destination_path: Destination of transferred files on
68 remote machine
69 :param bool proxy: Proxy through the Juju API server
70 :param str scp_opts: Additional options to the `scp` command
71
72 """
73 pass
74
75 def set_meter_status(self):
76 """Set the meter status on this unit.
77
78 """
79 pass
80
81 def ssh(
82 self, command, user=None, proxy=False, ssh_opts=None):
83 """Execute a command over SSH on this unit.
84
85 :param str command: Command to execute
86 :param str user: Remote username
87 :param bool proxy: Proxy through the Juju API server
88 :param str ssh_opts: Additional options to the `ssh` command
89
90 """
91 pass
92
93 def status_history(self, num=20, utc=False):
94 """Get status history for this unit.
95
96 :param int num: Size of history backlog
97 :param bool utc: Display time as UTC in RFC3339 format
98
99 """
100 pass