Merge "Handle DNS domain for metadata"

This commit is contained in:
Zuul 2020-01-14 16:18:45 +00:00 committed by Gerrit Code Review
commit 6dc287e9ac
2 changed files with 5 additions and 0 deletions

View File

@ -518,6 +518,9 @@ def neutron_settings():
neutron_api_info['neutron_security_groups'],
'quantum_url': neutron_api_info['neutron_url'],
})
# DNS domain is optional
if neutron_api_info.get('dns_domain'):
neutron_settings['dns_domain'] = neutron_api_info['dns_domain']
neutron_url = urlparse(neutron_settings['quantum_url'])
neutron_settings['quantum_host'] = neutron_url.hostname
neutron_settings['quantum_port'] = neutron_url.port

View File

@ -605,6 +605,7 @@ class NovaCCHooksTests(CharmTestCase):
'neutron_plugin': 'bob',
'neutron_security_groups': 'yes',
'neutron_url': 'http://nova-cc-host1:9696',
'dns_domain': 'example.tld',
}
napi.return_value = mock_NeutronAPIContext
@ -635,6 +636,7 @@ class NovaCCHooksTests(CharmTestCase):
network_manager='neutron',
enable_serial_console='false',
serial_console_base_url='ws://controller:6803',
dns_domain='example.tld',
**FAKE_KS_AUTH_CFG)
@patch('charmhelpers.contrib.openstack.ip.canonical_url')