projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filling in params, docstrings (wip)
[osm/N2VC.git]
/
juju
/
service.py
diff --git
a/juju/service.py
b/juju/service.py
index
08324bd
..
007306a
100644
(file)
--- a/
juju/service.py
+++ b/
juju/service.py
@@
-1,26
+1,44
@@
class Service(object):
class Service(object):
- def add_relation(self):
+ def add_relation(self
, local_relation, remote_relation
):
"""Add a relation to another service.
"""Add a relation to another service.
+ :param str local_relation: Name of relation on this service
+ :param str remote_relation: Name of relation on the other service in
+ the form '<service>[:<relation_name>]'
+
"""
pass
"""
pass
- def add_unit(self):
+ def add_unit(self
, count=1, to=None
):
"""Add one or more units to this service.
"""Add one or more units to this service.
+ :param int count: Number of units to add
+ :param str to: Placement directive, e.g.::
+ '23' - machine 23
+ 'lxc:7' - new lxc container on machine 7
+ '24/lxc/3' - lxc container 3 or machine 24
+
+ If None, a new machine is provisioned.
+
"""
pass
add_units = add_unit
"""
pass
add_units = add_unit
- def allocate(self):
+ def allocate(self
, budget, value
):
"""Allocate budget to this service.
"""Allocate budget to this service.
+ :param str budget: Name of budget
+ :param int value: Budget limit
+
"""
pass
"""
pass
- def attach(self):
+ def attach(self
, resource_name, file_path
):
"""Upload a file as a resource for this service.
"""Upload a file as a resource for this service.
+ :param str resource: Name of the resource
+ :param str file_path: Path to the file to upload
+
"""
pass
"""
pass
@@
-30,9
+48,13
@@
class Service(object):
"""
pass
"""
pass
- def destroy_relation(self):
+ def destroy_relation(self
, local_relation, remote_relation
):
"""Remove a relation to another service.
"""Remove a relation to another service.
+ :param str local_relation: Name of relation on this service
+ :param str remote_relation: Name of relation on the other service in
+ the form '<service>[:<relation_name>]'
+
"""
pass
remove_relation = destroy_relation
"""
pass
remove_relation = destroy_relation
@@
-62,15
+84,20
@@
class Service(object):
"""
pass
"""
pass
- def get_actions(self):
+ def get_actions(self
, schema=False
):
"""Get actions defined for this service.
"""Get actions defined for this service.
+ :param bool schema: Return the full action schema
+
"""
pass
"""
pass
- def get_resources(self):
+ def get_resources(self
, details=False
):
"""Return resources for this service.
"""Return resources for this service.
+ :param bool details: Include detailed info about resources used by each
+ unit
+
"""
pass
"""
pass