Add functional tests for Neutron DNS extension

Since with [0] we now support setting DNS domain and name attributes for
floating IPs, add them to the functional test.

Enable the neutron-dns service for the functional tests.

[0] https://review.openstack.org/558820

Change-Id: Ie856e275a1bde03d70a8c3391593e987743d45fe
This commit is contained in:
Jens Harbott 2018-04-05 12:40:24 +00:00 committed by Jens Harbott (frickler)
parent 08169b6f9f
commit 1fc0ea2d3b
2 changed files with 8 additions and 1 deletions

View File

@ -136,6 +136,7 @@
o-cw: true
o-hm: true
o-hk: true
neutron-dns: true
neutron-qos: true
neutron-trunk: true
tox_environment:

View File

@ -31,6 +31,8 @@ class TestFloatingIP(base.BaseFunctionalTest):
ROT_ID = None
PORT_ID = None
FIP = None
DNS_DOMAIN = "example.org."
DNS_NAME = "fip1"
def setUp(self):
super(TestFloatingIP, self).setUp()
@ -68,7 +70,9 @@ class TestFloatingIP(base.BaseFunctionalTest):
assert isinstance(prt, port.Port)
self.PORT_ID = prt.id
# Create Floating IP.
fip = self.conn.network.create_ip(floating_network_id=self.EXT_NET_ID)
fip = self.conn.network.create_ip(
floating_network_id=self.EXT_NET_ID,
dns_domain=self.DNS_DOMAIN, dns_name=self.DNS_NAME)
assert isinstance(fip, floating_ip.FloatingIP)
self.FIP = fip
@ -139,6 +143,8 @@ class TestFloatingIP(base.BaseFunctionalTest):
self.assertEqual(self.FIP.fixed_ip_address, sot.fixed_ip_address)
self.assertEqual(self.FIP.port_id, sot.port_id)
self.assertEqual(self.FIP.router_id, sot.router_id)
self.assertEqual(self.DNS_DOMAIN, sot.dns_domain)
self.assertEqual(self.DNS_NAME, sot.dns_name)
def test_list(self):
ids = [o.id for o in self.conn.network.ips()]