From: Cory Johns Date: Tue, 25 Oct 2016 21:35:00 +0000 (-0400) Subject: Add application status and message property X-Git-Tag: 0.1.0~64 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=commitdiff_plain;h=a0aff95b67e6acf775405633b205fc04e3c4ecd3 Add application status and message property --- diff --git a/juju/application.py b/juju/application.py index f6129a5..4e0154a 100644 --- a/juju/application.py +++ b/juju/application.py @@ -35,6 +35,18 @@ class Application(model.ModelEntity): 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.