Add test that ensures subnet is usable after update

Adds a simple test to make sure a port can be created
on a subnet after disabling DHCP.

Related-Bug: #1573443
Change-Id: I94f1a59e52b109984904fd9e56e3c1a3f1c270fe
diff --git a/neutron/tests/tempest/api/test_ports.py b/neutron/tests/tempest/api/test_ports.py
index dd929da..7bf4790 100644
--- a/neutron/tests/tempest/api/test_ports.py
+++ b/neutron/tests/tempest/api/test_ports.py
@@ -39,3 +39,10 @@
         self.assertEqual('d2', body['port']['description'])
         body = self.client.list_ports(id=body['port']['id'])['ports'][0]
         self.assertEqual('d2', body['description'])
+
+    @test.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)
+        self.create_port(self.network)
+        self.client.update_subnet(s['id'], enable_dhcp=True)
+        self.create_port(self.network)