Skip to content

Commit

Permalink
Merge "Add missing constraints to /info"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Apr 9, 2014
2 parents 8d4a2e9 + 677ee3c commit daecec6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 2 additions & 10 deletions swift/proxy/server.py
Expand Up @@ -204,16 +204,8 @@ def __init__(self, conf, memcache=None, logger=None, account_ring=None,
self.admin_key = conf.get('admin_key', None)
register_swift_info(
version=swift_version,
max_file_size=constraints.MAX_FILE_SIZE,
max_meta_name_length=constraints.MAX_META_NAME_LENGTH,
max_meta_value_length=constraints.MAX_META_VALUE_LENGTH,
max_meta_count=constraints.MAX_META_COUNT,
account_listing_limit=constraints.ACCOUNT_LISTING_LIMIT,
container_listing_limit=constraints.CONTAINER_LISTING_LIMIT,
max_account_name_length=constraints.MAX_ACCOUNT_NAME_LENGTH,
max_container_name_length=constraints.MAX_CONTAINER_NAME_LENGTH,
max_object_name_length=constraints.MAX_OBJECT_NAME_LENGTH,
strict_cors_mode=self.strict_cors_mode)
strict_cors_mode=self.strict_cors_mode,
**constraints.EFFECTIVE_CONSTRAINTS)

def check_config(self):
"""
Expand Down
3 changes: 3 additions & 0 deletions test/unit/proxy/test_server.py
Expand Up @@ -5902,6 +5902,9 @@ def test_registered_defaults(self):
self.assertEqual(si['max_meta_value_length'],
constraints.MAX_META_VALUE_LENGTH)
self.assertEqual(si['max_meta_count'], constraints.MAX_META_COUNT)
self.assertEqual(si['max_header_size'], constraints.MAX_HEADER_SIZE)
self.assertEqual(si['max_meta_overall_size'],
constraints.MAX_META_OVERALL_SIZE)
self.assertEqual(si['account_listing_limit'],
constraints.ACCOUNT_LISTING_LIMIT)
self.assertEqual(si['container_listing_limit'],
Expand Down

0 comments on commit daecec6

Please sign in to comment.