projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3a10e93
)
Add application status and message property
author
Cory Johns
<johnsca@gmail.com>
Tue, 25 Oct 2016 21:35:00 +0000
(17:35 -0400)
committer
Cory Johns
<johnsca@gmail.com>
Tue, 25 Oct 2016 21:48:04 +0000
(17:48 -0400)
juju/application.py
patch
|
blob
|
history
diff --git
a/juju/application.py
b/juju/application.py
index
f6129a5
..
4e0154a
100644
(file)
--- a/
juju/application.py
+++ b/
juju/application.py
@@
-35,6
+35,18
@@
class Application(model.ModelEntity):
if unit.application == self.name
]
if unit.application == self.name
]
+ @property
+ def status(self):
+ """Get the application status, as set by the charm's leader.
+ """
+ return self.data['status']['current']
+
+ @property
+ def status_message(self):
+ """Get the application status message, as set by the charm's leader.
+ """
+ return self.data['status']['message']
+
def add_relation(self, local_relation, remote_relation):
"""Add a relation to another application.
def add_relation(self, local_relation, remote_relation):
"""Add a relation to another application.