mirror of https://github.com/docker/docker-py.git
Add health property to Containers model
Signed-off-by: Jay Turner <jay.turner@kayenta.io>
This commit is contained in:
parent
84414e343e
commit
f0d38fb7f4
|
@ -62,6 +62,13 @@ class Container(Model):
|
|||
return self.attrs['State']['Status']
|
||||
return self.attrs['State']
|
||||
|
||||
@property
|
||||
def health(self):
|
||||
"""
|
||||
The healthcheck status of the container. For example, ``healthy`, or ``unhealthy`.
|
||||
"""
|
||||
return self.attrs.get('State', {}).get('Health', {}).get('Status', 'unknown')
|
||||
|
||||
@property
|
||||
def ports(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue