diff options
author | Kiall Mac Innes <kiall@hp.com> | 2015-04-02 16:46:49 +0100 |
---|---|---|
committer | Kiall Mac Innes <kiall@hp.com> | 2015-04-02 16:47:17 +0100 |
commit | 63f7db59a86e196f601278d38d236d15148990b6 (patch) | |
tree | 48944204e6015c02a5b363570b0e6b8fdc5f2d96 | |
parent | 3ebffaf9886c5d72ce5ff52a09a82b81a5d0d627 (diff) | |
download | designate-63f7db59a86e196f601278d38d236d15148990b6.tar.gz |
Fix min_ttl config to be an IntOpt
min_ttl was incorrectly defined as a StrOpt, rather than
and IntOpt.
Change-Id: I9d8769cd9bcd4d7f81e9a3014060090e2cf683c3
-rw-r--r-- | designate/central/__init__.py | 2 | ||||
-rw-r--r-- | designate/tests/test_central/test_service.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/designate/central/__init__.py b/designate/central/__init__.py index ff0ee099..b9c6eb8a 100644 --- a/designate/central/__init__.py +++ b/designate/central/__init__.py @@ -36,7 +36,7 @@ cfg.CONF.register_opts([ cfg.StrOpt('managed_resource_tenant_id', default="00000000-0000-0000-0000-000000000000", help="The Tenant ID that will own any managed resources."), - cfg.StrOpt('min_ttl', default=None, help="Minimum TTL allowed"), + cfg.IntOpt('min_ttl', default=None, help="Minimum TTL allowed"), # TODO(betsy): Move to Pool Service once that is written cfg.StrOpt('default_pool_id', default='794ccc2c-d751-44fe-b57f-8894c9f5c842', diff --git a/designate/tests/test_central/test_service.py b/designate/tests/test_central/test_service.py index 6ecb25d4..70959c6b 100644 --- a/designate/tests/test_central/test_service.py +++ b/designate/tests/test_central/test_service.py @@ -215,7 +215,7 @@ class CentralServiceTest(CentralTestCase): def test_is_valid_ttl(self): self.policy({'use_low_ttl': '!'}) - self.config(min_ttl="100", + self.config(min_ttl=100, group='service:central') context = self.get_context() @@ -667,7 +667,7 @@ class CentralServiceTest(CentralTestCase): def test_create_domain_invalid_ttl_fail(self): self.policy({'use_low_ttl': '!'}) - self.config(min_ttl="100", + self.config(min_ttl=100, group='service:central') context = self.get_context() @@ -1122,7 +1122,7 @@ class CentralServiceTest(CentralTestCase): def test_create_invalid_recordset_ttl(self): self.policy({'use_low_ttl': '!'}) - self.config(min_ttl="100", + self.config(min_ttl=100, group='service:central') domain = self.create_domain() |