Filling in params, docstrings (wip)
[osm/N2VC.git] / juju / service.py
1 class Service(object):
2 def add_relation(self, local_relation, remote_relation):
3 """Add a relation to another service.
4
5 :param str local_relation: Name of relation on this service
6 :param str remote_relation: Name of relation on the other service in
7 the form '<service>[:<relation_name>]'
8
9 """
10 pass
11
12 def add_unit(self, count=1, to=None):
13 """Add one or more units to this service.
14
15 :param int count: Number of units to add
16 :param str to: Placement directive, e.g.::
17 '23' - machine 23
18 'lxc:7' - new lxc container on machine 7
19 '24/lxc/3' - lxc container 3 or machine 24
20
21 If None, a new machine is provisioned.
22
23 """
24 pass
25 add_units = add_unit
26
27 def allocate(self, budget, value):
28 """Allocate budget to this service.
29
30 :param str budget: Name of budget
31 :param int value: Budget limit
32
33 """
34 pass
35
36 def attach(self, resource_name, file_path):
37 """Upload a file as a resource for this service.
38
39 :param str resource: Name of the resource
40 :param str file_path: Path to the file to upload
41
42 """
43 pass
44
45 def collect_metrics(self):
46 """Collect metrics on this service.
47
48 """
49 pass
50
51 def destroy_relation(self, local_relation, remote_relation):
52 """Remove a relation to another service.
53
54 :param str local_relation: Name of relation on this service
55 :param str remote_relation: Name of relation on the other service in
56 the form '<service>[:<relation_name>]'
57
58 """
59 pass
60 remove_relation = destroy_relation
61
62 def destroy(self):
63 """Remove this service from the model.
64
65 """
66 pass
67 remove = destroy
68
69 def expose(self):
70 """Make this service publicly available over the network.
71
72 """
73 pass
74
75 def get_config(self):
76 """Return the configuration settings for this service.
77
78 """
79 pass
80
81 def get_constraints(self):
82 """Return the machine constraints for this service.
83
84 """
85 pass
86
87 def get_actions(self, schema=False):
88 """Get actions defined for this service.
89
90 :param bool schema: Return the full action schema
91
92 """
93 pass
94
95 def get_resources(self, details=False):
96 """Return resources for this service.
97
98 :param bool details: Include detailed info about resources used by each
99 unit
100
101 """
102 pass
103
104 def run(self):
105 """Run command on all units for this service.
106
107 """
108 pass
109
110 def set_config(self):
111 """Set configuration options for this service.
112
113 """
114 pass
115
116 def set_constraints(self):
117 """Set machine constraints for this service.
118
119 """
120 pass
121
122 def set_meter_status(self):
123 """Set the meter status on this status.
124
125 """
126 pass
127
128 def set_plan(self):
129 """Set the plan for this service, effective immediately.
130
131 """
132 pass
133
134 def unexpose(self):
135 """Remove public availability over the network for this service.
136
137 """
138 pass
139
140 def update_allocation(self):
141 """Update existing allocation for this service.
142
143 """
144 pass
145
146 def upgrade_charm(self):
147 """Upgrade the charm for this service.
148
149 """
150 pass