Skip to content

Commit f15943f

Browse files
committed
Backport model.name from HEAD into 2.9
Gets this particular change from 55ea0e2 adds the name @Property into a Model object. Couldn't directly cherry pick because of the other stuff in the commit.
1 parent d9df8ad commit f15943f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

juju/model.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,14 @@ async def get_info(self):
10211021

10221022
return self.info
10231023

1024+
@property
1025+
def name(self):
1026+
"""Return the name of this model
1027+
"""
1028+
if self._info is None:
1029+
raise JujuError("Model is not connected")
1030+
return self._info.name
1031+
10241032
@property
10251033
def info(self):
10261034
"""Return the cached client.ModelInfo object for this Model.

0 commit comments

Comments
 (0)