podman: container names when running paunch list
The output of 'podman inspect' doesn't add a leading slash in container's name, this is only for docker. Fix paunch container iteration accordingly. Change-Id: Ic9237f27675be8170004ca34a3d48ac43bb8cf7e
This commit is contained in:
parent
99ac720bf6
commit
b8f67c9589
|
@ -353,7 +353,11 @@ class List(lister.Lister):
|
|||
data = []
|
||||
for k, v in configs.items():
|
||||
for i in v:
|
||||
name = i.get('Name', '/')[1:] # strip the leading slash
|
||||
# docker has a leading slash in the name, strip it
|
||||
if parsed_args.default_runtime == 'docker':
|
||||
name = i.get('Name', '/')[1:]
|
||||
else:
|
||||
name = i.get('Name', '')
|
||||
cmd = ' '.join(i.get('Config', {}).get('Cmd', []))
|
||||
image = i.get('Config', {}).get('Image')
|
||||
status = i.get('State', {}).get('Status')
|
||||
|
|
Loading…
Reference in New Issue