add the account management config values to swift info

added account_autocreate and allow_account_management to
the /info endpoint

Change-Id: I4b239c9cefb728c3c93bf75cad065c72edf2fc0a
This commit is contained in:
John Dickinson 2014-08-17 21:08:57 -07:00
parent 39b03d0ddd
commit 75a329c7f5
2 changed files with 5 additions and 1 deletions

View File

@ -209,6 +209,8 @@ class Application(object):
version=swift_version,
strict_cors_mode=self.strict_cors_mode,
policies=POLICIES.get_policy_info(),
allow_account_management=self.allow_account_management,
account_autocreate=self.account_autocreate,
**constraints.EFFECTIVE_CONSTRAINTS)
def check_config(self):

View File

@ -6806,9 +6806,11 @@ class TestSwiftInfo(unittest.TestCase):
self.assertEqual(si['max_object_name_length'],
constraints.MAX_OBJECT_NAME_LENGTH)
self.assertTrue('strict_cors_mode' in si)
self.assertEqual(si['allow_account_management'], False)
self.assertEqual(si['account_autocreate'], False)
# this next test is deliberately brittle in order to alert if
# other items are added to swift info
self.assertEqual(len(si), 14)
self.assertEqual(len(si), 16)
self.assertTrue('policies' in si)
sorted_pols = sorted(si['policies'], key=operator.itemgetter('name'))