Merge "podman: container names when running paunch list"

This commit is contained in:
Zuul 2019-01-14 15:54:17 +00:00 committed by Gerrit Code Review
commit f94ea96092
1 changed files with 5 additions and 1 deletions

View File

@ -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')