Merge "Print 'Container Count' in data base info"

This commit is contained in:
Jenkins 2014-04-14 16:59:40 +00:00 committed by Gerrit Code Review
commit e0108af54f
2 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,8 @@ def print_db_info_metadata(db_type, info, metadata):
print (' Delete Timestamp: %s (%s)' %
(datetime.utcfromtimestamp(float(info['delete_timestamp'])),
info['delete_timestamp']))
if db_type == 'account':
print ' Container Count: %s' % info['container_count']
print ' Object Count: %s' % info['object_count']
print ' Bytes Used: %s' % info['bytes_used']
if db_type == 'container':

View File

@ -86,6 +86,7 @@ class TestCliInfo(unittest.TestCase):
created_at=100.1,
put_timestamp=106.3,
delete_timestamp=107.9,
container_count='3',
object_count='20',
bytes_used='42')
info['hash'] = 'abaddeadbeefcafe'
@ -102,6 +103,7 @@ Metadata:
Created at: 1970-01-01 00:01:40.100000 (100.1)
Put Timestamp: 1970-01-01 00:01:46.300000 (106.3)
Delete Timestamp: 1970-01-01 00:01:47.900000 (107.9)
Container Count: 3
Object Count: 20
Bytes Used: 42
Chexor: abaddeadbeefcafe