From: Cynerva Date: Wed, 28 Jun 2017 20:58:54 +0000 (-0500) Subject: Add Unit.public_address property X-Git-Tag: 0.6.0~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=6d11e9199ddb40cb474ae68150fc79fa6ea35e22;p=osm%2FN2VC.git Add Unit.public_address property --- diff --git a/juju/unit.py b/juju/unit.py index 7a6378a..0f2a51c 100644 --- a/juju/unit.py +++ b/juju/unit.py @@ -51,6 +51,13 @@ class Unit(model.ModelEntity): """ return self.safe_data['workload-status']['message'] + @property + def public_address(self): + """ Get the public address. + + """ + return self.safe_data['public-address'] or None + @property def tag(self): return 'unit-%s' % self.name.replace('/', '-')