default='openstacklocal',
help='Domain to use for building the hostnames'),
cfg.StrOpt('dnsmasq_config_file',
+ default='',
help='Override the default dnsmasq settings with this file'),
cfg.StrOpt('dnsmasq_dns_server',
help='Use another DNS server before any in /etc/resolv.conf.'),
mode,
self.conf.dhcp_lease_time))
- if self.conf.dnsmasq_config_file:
- cmd.append('--conf-file=%s' % self.conf.dnsmasq_config_file)
+ cmd.append('--conf-file=%s' % self.conf.dnsmasq_config_file)
if self.conf.dnsmasq_dns_server:
cmd.append('--server=%s' % self.conf.dnsmasq_dns_server)
'dnsmasq-lease-update'),
'--leasefile-ro',
'--dhcp-range=set:tag0,192.168.0.0,static,120s',
- '--dhcp-range=set:tag1,fdca:3ba5:a17a:4ba3::,static,120s'
+ '--dhcp-range=set:tag1,fdca:3ba5:a17a:4ba3::,static,120s',
]
expected.extend(extra_options)
check_exit_code=True)
def test_spawn(self):
- self._test_spawn([])
+ self._test_spawn(['--conf-file='])
def test_spawn_cfg_config_file(self):
self.conf.set_override('dnsmasq_config_file', '/foo')
def test_spawn_cfg_dns_server(self):
self.conf.set_override('dnsmasq_dns_server', '8.8.8.8')
- self._test_spawn(['--server=8.8.8.8'])
+ self._test_spawn(['--conf-file=', '--server=8.8.8.8'])
def test_output_opts_file(self):
fake_v6 = 'gdca:3ba5:a17a:4ba3::1'