Displays container specific information in freezer

When user passes container name while performing info
action, only container specific information will be shown

Change-Id: I38fc19ed931cd0e952e0ede57afca4afdaee78df
Closes-Bug: #1684026
This commit is contained in:
Vishakha Agarwal 2018-04-11 14:16:00 +05:30
parent ebc4e8a57c
commit f5d9995dd5
1 changed files with 8 additions and 0 deletions

View File

@ -94,12 +94,20 @@ class InfoJob(Job):
fields = ["Container", "Size", "Object Count"]
data = []
for container in info:
if self.conf.container:
container_name = container.get('container_name')
if container_name != self.conf.container:
continue
values = [
container.get('container_name'),
container.get('size'),
container.get('objects_count')
]
data.append(values)
if self.conf.container:
break # values for given container were found
return [fields, data]