projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
51e09af
)
Docs
author
Tim Van Steenburgh
<tvansteenburgh@gmail.com>
Tue, 20 Dec 2016 15:23:09 +0000
(10:23 -0500)
committer
Tim Van Steenburgh
<tvansteenburgh@gmail.com>
Tue, 20 Dec 2016 15:23:09 +0000
(10:23 -0500)
docs/narrative/application.rst
patch
|
blob
|
history
docs/narrative/controller.rst
patch
|
blob
|
history
docs/narrative/model.rst
patch
|
blob
|
history
docs/narrative/unit.rst
patch
|
blob
|
history
juju/application.py
patch
|
blob
|
history
juju/model.py
patch
|
blob
|
history
juju/unit.py
patch
|
blob
|
history
diff --git
a/docs/narrative/application.rst
b/docs/narrative/application.rst
index
044807d
..
01d5bc0
100644
(file)
--- a/
docs/narrative/application.rst
+++ b/
docs/narrative/application.rst
@@
-1,5
+1,6
@@
Applications
============
Applications
============
+For api docs, see :class:`juju.application.Application`.
Deploying
Deploying
diff --git
a/docs/narrative/controller.rst
b/docs/narrative/controller.rst
index
c6f4e0a
..
2da0e7b
100644
(file)
--- a/
docs/narrative/controller.rst
+++ b/
docs/narrative/controller.rst
@@
-8,6
+8,8
@@
Connecting to the controller endpoint is useful if you want to programmatically
create a new model. If the model you want to use already exists, you can
connect directly to it (see :doc:`model`).
create a new model. If the model you want to use already exists, you can
connect directly to it (see :doc:`model`).
+For api docs, see :class:`juju.controller.Controller`.
+
Connecting to the Current Controller
------------------------------------
Connecting to the Current Controller
------------------------------------
diff --git
a/docs/narrative/model.rst
b/docs/narrative/model.rst
index
c27179d
..
6811eac
100644
(file)
--- a/
docs/narrative/model.rst
+++ b/
docs/narrative/model.rst
@@
-4,6
+4,8
@@
A Juju controller provides websocket endpoints for each of its
models. In order to do anything useful with a model, the juju lib must
connect to one of these endpoints. There are several ways to do this.
models. In order to do anything useful with a model, the juju lib must
connect to one of these endpoints. There are several ways to do this.
+For api docs, see :class:`juju.model.Model`.
+
Connecting to the Current Model
-------------------------------
Connecting to the Current Model
-------------------------------
diff --git
a/docs/narrative/unit.rst
b/docs/narrative/unit.rst
index
d7da412
..
5d6b48d
100644
(file)
--- a/
docs/narrative/unit.rst
+++ b/
docs/narrative/unit.rst
@@
-1,5
+1,7
@@
Units
=====
Units
=====
+For api docs, see :class:`juju.unit.Unit`.
+
Running Commands
----------------
Running Commands
----------------
diff --git
a/juju/application.py
b/juju/application.py
index
55b9d1e
..
dc615fd
100644
(file)
--- a/
juju/application.py
+++ b/
juju/application.py
@@
-344,4
+344,9
@@
class Application(model.ModelEntity):
pass
async def get_metrics(self):
pass
async def get_metrics(self):
+ """Get metrics for this application's units.
+
+ :return: Dictionary of unit_name:metrics
+
+ """
return await self.model.get_metrics(self.tag)
return await self.model.get_metrics(self.tag)
diff --git
a/juju/model.py
b/juju/model.py
index
4a8bc03
..
a0180a0
100644
(file)
--- a/
juju/model.py
+++ b/
juju/model.py
@@
-1264,6
+1264,8
@@
class Model(object):
:param str \*tags: Tags of entities from which to retrieve metrics.
No tags retrieves the metrics of all units in the model.
:param str \*tags: Tags of entities from which to retrieve metrics.
No tags retrieves the metrics of all units in the model.
+ :return: Dictionary of unit_name:metrics
+
"""
log.debug("Retrieving metrics for %s",
', '.join(tags) if tags else "all units")
"""
log.debug("Retrieving metrics for %s",
', '.join(tags) if tags else "all units")
diff --git
a/juju/unit.py
b/juju/unit.py
index
9a75404
..
0145913
100644
(file)
--- a/
juju/unit.py
+++ b/
juju/unit.py
@@
-240,5
+240,10
@@
class Unit(model.ModelEntity):
False)
async def get_metrics(self):
False)
async def get_metrics(self):
+ """Get metrics for the unit.
+
+ :return: Dictionary of metrics for this unit.
+
+ """
metrics = await self.model.get_metrics(self.tag)
return metrics[self.name]
metrics = await self.model.get_metrics(self.tag)
return metrics[self.name]