diff --git a/swift/cli/info.py b/swift/cli/info.py index 179d5b16aa..9f893f6037 100644 --- a/swift/cli/info.py +++ b/swift/cli/info.py @@ -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': diff --git a/test/unit/cli/test_info.py b/test/unit/cli/test_info.py index 88914493a9..306bb608b6 100644 --- a/test/unit/cli/test_info.py +++ b/test/unit/cli/test_info.py @@ -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