Merge "Sync the dns-assignment with the actual designate dns-domain"
This commit is contained in:
commit
ad89914694
|
@ -288,6 +288,8 @@ class DNSExtensionDriver(api.ExtensionDriver):
|
||||||
if dns_domain and dns_domain != lib_const.DNS_DOMAIN_DEFAULT:
|
if dns_domain and dns_domain != lib_const.DNS_DOMAIN_DEFAULT:
|
||||||
if dns_data_db:
|
if dns_data_db:
|
||||||
dns_name = dns_data_db.dns_name
|
dns_name = dns_data_db.dns_name
|
||||||
|
if dns_data_db.current_dns_domain:
|
||||||
|
dns_domain = dns_data_db.current_dns_domain
|
||||||
return dns_name, dns_domain
|
return dns_name, dns_domain
|
||||||
|
|
||||||
def _get_dns_names_for_port(self, ips, dns_data_db):
|
def _get_dns_names_for_port(self, ips, dns_data_db):
|
||||||
|
|
|
@ -165,6 +165,9 @@ class DNSIntegrationTestCase(test_plugin.Ml2PluginV2TestCase):
|
||||||
self.assertEqual(current_dns_name, dns_data_db['current_dns_name'])
|
self.assertEqual(current_dns_name, dns_data_db['current_dns_name'])
|
||||||
self.assertEqual(previous_dns_name,
|
self.assertEqual(previous_dns_name,
|
||||||
dns_data_db['previous_dns_name'])
|
dns_data_db['previous_dns_name'])
|
||||||
|
curr_dns_domain = dns_data_db['current_dns_domain']
|
||||||
|
for fqdn in port['dns_assignment']:
|
||||||
|
self.assertTrue(fqdn['fqdn'].endswith(curr_dns_domain))
|
||||||
if current_dns_name:
|
if current_dns_name:
|
||||||
self.assertEqual(current_dns_domain,
|
self.assertEqual(current_dns_domain,
|
||||||
dns_data_db['current_dns_domain'])
|
dns_data_db['current_dns_domain'])
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The dns-assignment will reflect the dns-domain defined in the network or
|
||||||
|
sent by user when creating the port using --dns-domain rather than just
|
||||||
|
take the dns-domain defined in the neutron configuration
|
Loading…
Reference in New Issue