Skip to content

Commit 1279b68

Browse files
committed
Add subordinate_units for application.Application
1 parent 939a375 commit 1279b68

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

juju/application.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ def units(self):
6464
if unit.application == self.name
6565
]
6666

67+
@property
68+
def subordinate_units(self):
69+
"""Returns the subordinate units of this application"""
70+
return [u for u in self.units if u.is_subordinate]
71+
6772
@property
6873
def relations(self):
6974
return [rel for rel in self.model.relations if rel.matches(self.name)]

0 commit comments

Comments
 (0)