Add number to container
This commit is contained in:
parent
5d9a5a0c84
commit
8ed86ed551
2 changed files with 21 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ class Container(object):
|
|||
def name(self):
|
||||
return self.dictionary['Name'][1:]
|
||||
|
||||
@property
|
||||
def number(self):
|
||||
try:
|
||||
return int(self.name.split('_')[-1])
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
@property
|
||||
def human_readable_ports(self):
|
||||
self.inspect_if_not_inspected()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue