007306a82748d3fce2c5f34f96b0f3172d92d60d
2 def add_relation(self
, local_relation
, remote_relation
):
3 """Add a relation to another service.
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>]'
12 def add_unit(self
, count
=1, to
=None):
13 """Add one or more units to this service.
15 :param int count: Number of units to add
16 :param str to: Placement directive, e.g.::
18 'lxc:7' - new lxc container on machine 7
19 '24/lxc/3' - lxc container 3 or machine 24
21 If None, a new machine is provisioned.
27 def allocate(self
, budget
, value
):
28 """Allocate budget to this service.
30 :param str budget: Name of budget
31 :param int value: Budget limit
36 def attach(self
, resource_name
, file_path
):
37 """Upload a file as a resource for this service.
39 :param str resource: Name of the resource
40 :param str file_path: Path to the file to upload
45 def collect_metrics(self
):
46 """Collect metrics on this service.
51 def destroy_relation(self
, local_relation
, remote_relation
):
52 """Remove a relation to another service.
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>]'
60 remove_relation
= destroy_relation
63 """Remove this service from the model.
70 """Make this service publicly available over the network.
76 """Return the configuration settings for this service.
81 def get_constraints(self
):
82 """Return the machine constraints for this service.
87 def get_actions(self
, schema
=False):
88 """Get actions defined for this service.
90 :param bool schema: Return the full action schema
95 def get_resources(self
, details
=False):
96 """Return resources for this service.
98 :param bool details: Include detailed info about resources used by each
105 """Run command on all units for this service.
110 def set_config(self
):
111 """Set configuration options for this service.
116 def set_constraints(self
):
117 """Set machine constraints for this service.
122 def set_meter_status(self
):
123 """Set the meter status on this status.
129 """Set the plan for this service, effective immediately.
135 """Remove public availability over the network for this service.
140 def update_allocation(self
):
141 """Update existing allocation for this service.
146 def upgrade_charm(self
):
147 """Upgrade the charm for this service.