diff --git a/devstack/lib/dns b/devstack/lib/dns index aeb928c1a7d..8177a8c900b 100644 --- a/devstack/lib/dns +++ b/devstack/lib/dns @@ -1,5 +1,5 @@ function configure_dns_extension { - neutron_ml2_extension_driver_add "dns" + neutron_ml2_extension_driver_add "dns_domain_ports" } function post_config_dns_extension { iniset $NEUTRON_CONF DEFAULT dns_domain openstackgate.local diff --git a/neutron/tests/tempest/api/test_ports.py b/neutron/tests/tempest/api/test_ports.py index 8d8468c862e..acafa570b5e 100644 --- a/neutron/tests/tempest/api/test_ports.py +++ b/neutron/tests/tempest/api/test_ports.py @@ -91,6 +91,30 @@ class PortsTestJSON(base.BaseNetworkTest): self.assertFalse(port_body['port']['dns_name']) self._confirm_dns_assignment(port_body['port']) + @decorators.idempotent_id('dfe8cc79-18d9-4ae8-acef-3ec6bb719aa7') + @test.requires_ext(extension="dns-domain-ports", + service="network") + def test_create_update_port_with_dns_domain(self): + self.create_subnet(self.network) + body = self.create_port(self.network, dns_name='d1', + dns_domain='test.org.') + self.assertEqual('d1', body['dns_name']) + self.assertEqual('test.org.', body['dns_domain']) + self._confirm_dns_assignment(body) + body = self.client.list_ports(id=body['id'])['ports'][0] + self._confirm_dns_assignment(body) + self.assertEqual('d1', body['dns_name']) + self.assertEqual('test.org.', body['dns_domain']) + body = self.client.update_port(body['id'], + dns_name='d2', dns_domain='d.org.') + self.assertEqual('d2', body['port']['dns_name']) + self.assertEqual('d.org.', body['dns_domain']) + self._confirm_dns_assignment(body['port']) + body = self.client.show_port(body['port']['id'])['port'] + self.assertEqual('d2', body['dns_name']) + self.assertEqual('d.org.', body['dns_domain']) + self._confirm_dns_assignment(body) + @decorators.idempotent_id('c72c1c0c-2193-4aca-bbb4-b1442640c123') def test_change_dhcp_flag_then_create_port(self): s = self.create_subnet(self.network, enable_dhcp=False)