]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
fix broken flush in db.network_destroy, pep8 fixes
authorDan Wendlandt <dan@nicira.com>
Tue, 2 Aug 2011 17:14:25 +0000 (10:14 -0700)
committerDan Wendlandt <dan@nicira.com>
Tue, 2 Aug 2011 17:14:25 +0000 (10:14 -0700)
quantum/api/faults.py
quantum/common/exceptions.py
quantum/db/api.py

index 52b36109d7d2dcc3f99a8e8f5616ada74f9a339e..670ef9f89966062a50f3b6e47fdb345d84dd5f8c 100644 (file)
@@ -91,6 +91,7 @@ class NetworkInUse(webob.exc.HTTPClientError):
     title = 'Network in Use'
     explanation = ('Unable to remove the network: attachments still plugged.')
 
+
 class NetworkNameExists(webob.exc.HTTPClientError):
     """
     subclass of :class:`~HTTPClientError`
index b9705fb75ac91468cad6d50e0968eb26728920bf..23dc700a47b28be591deedc9be21cbaa6edc4249 100644 (file)
@@ -107,6 +107,7 @@ class AlreadyAttached(QuantumException):
                 "%(port_id)s for network %(net_id)s. The attachment is " \
                 "already plugged into port %(att_port_id)s")
 
+
 class NetworkNameExists(QuantumException):
     message = _("Unable to set network name to %(net_name). " \
                 "Network with id %(net_id) already has this name for " \
index 5711a47ddeb47b61ea13bbfdcb2e48dc19934fad..436df84152becce8ec164e489a84bc4b81cbcedc 100644 (file)
@@ -89,6 +89,7 @@ def _check_duplicate_net_name(tenant_id, net_name):
         # that net-names are unique within a tenant
         pass
 
+
 def network_create(tenant_id, name):
     session = get_session()
 
@@ -126,6 +127,7 @@ def network_rename(net_id, tenant_id, new_name):
     session.flush()
     return net
 
+
 def network_destroy(net_id):
     session = get_session()
     try:
@@ -225,7 +227,7 @@ def port_unset_attachment(port_id, net_id):
     port = port_get(port_id, net_id)
     port.interface_id = None
     session.merge(port)
-    session.flush
+    session.flush()
 
 
 def port_destroy(port_id, net_id):