1
# Copyright (c) 2012 OpenStack, LLC.
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
19
from quantum.common import config
20
from quantum.openstack.common import cfg
23
class ConfigurationTest(unittest.TestCase):
25
def test_defaults(self):
26
self.assertEqual('0.0.0.0', cfg.CONF.bind_host)
27
self.assertEqual(9696, cfg.CONF.bind_port)
28
self.assertEqual('api-paste.ini', cfg.CONF.api_paste_config)
29
self.assertEqual('', cfg.CONF.api_extensions_path)
30
self.assertEqual('policy.json', cfg.CONF.policy_file)
31
self.assertEqual('keystone', cfg.CONF.auth_strategy)
32
self.assertEqual(None, cfg.CONF.core_plugin)
33
self.assertEqual(0, len(cfg.CONF.service_plugins))
34
self.assertEqual('fa:16:3e:00:00:00', cfg.CONF.base_mac)
35
self.assertEqual(16, cfg.CONF.mac_generation_retries)
36
self.assertTrue(cfg.CONF.allow_bulk)
37
self.assertEqual(5, cfg.CONF.max_dns_nameservers)
38
self.assertEqual(20, cfg.CONF.max_subnet_host_routes)
39
self.assertEqual(os.path.abspath('../../..'),
41
self.assertEqual(120, cfg.CONF.dhcp_lease_duration)
42
self.assertFalse(cfg.CONF.allow_overlapping_ips)
43
self.assertEqual('quantum', cfg.CONF.control_exchange)