Refetch subnet/network from DB in ML2 update ops
This ensures that any extensions run in the ML2 extension framework
that bump the revision number of the subnet or network result in the
altered revision number being returned to the API caller and passed
into the ML2 mech drivers and callback handlers.
Closes-Bug: #1627628
Change-Id: Ieb37a3833ee52c671419c6dc981cf91c2366ae94
diff --git a/neutron/tests/tempest/api/test_revisions.py b/neutron/tests/tempest/api/test_revisions.py
index 78fcea4..a70b995 100644
--- a/neutron/tests/tempest/api/test_revisions.py
+++ b/neutron/tests/tempest/api/test_revisions.py
@@ -148,9 +148,7 @@
@test.requires_ext(extension="dns-integration", service="network")
def test_update_dns_domain_bumps_revision(self):
net = self.create_network(dns_domain='example.test.')
- self.client.update_network(net['id'], dns_domain='exa.test.')
- # TODO(kevinbenton): use update result after bug/1627628 is fixed
- updated = self.client.show_network(net['id'])
+ updated = self.client.update_network(net['id'], dns_domain='exa.test.')
self.assertGreater(updated['network']['revision_number'],
net['revision_number'])
port = self.create_port(net)
@@ -198,13 +196,12 @@
@test.requires_ext(extension="port-security", service="network")
def test_update_port_security_bumps_revisions(self):
net = self.create_network(port_security_enabled=False)
- self.client.update_network(net['id'], port_security_enabled=True)
- # TODO(kevinbenton): use update result after bug/1627628 is fixed
- updated = self.client.show_network(net['id'])
+ updated = self.client.update_network(net['id'],
+ port_security_enabled=True)
self.assertGreater(updated['network']['revision_number'],
net['revision_number'])
- self.client.update_network(net['id'], port_security_enabled=False)
- updated2 = self.client.show_network(net['id'])
+ updated2 = self.client.update_network(net['id'],
+ port_security_enabled=False)
self.assertGreater(updated2['network']['revision_number'],
updated['network']['revision_number'])
port = self.create_port(net, port_security_enabled=False)