]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Correct exception output for subnet deletion when port is used
authorGary Kotton <gkotton@redhat.com>
Wed, 26 Dec 2012 08:36:02 +0000 (08:36 +0000)
committerGary Kotton <gkotton@redhat.com>
Thu, 27 Dec 2012 08:05:56 +0000 (08:05 +0000)
Fixes bug 1093754

Change-Id: I2deaced0cfc2524234ff79e39e6e7c2f757ff19f

quantum/db/db_base_plugin_v2.py

index 7538207e96b8953ea3ab67e17343280a04e7c111..66b72e6e5d69f6aab0afe0469f13399934225da2 100644 (file)
@@ -1164,7 +1164,7 @@ class QuantumDbPluginV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
                                 a.ports.device_owner in AUTO_DELETE_PORT_OWNERS
                                 for a in allocated)
             if not only_auto_del:
-                raise q_exc.NetworkInUse(subnet_id=id)
+                raise q_exc.SubnetInUse(subnet_id=id)
 
             # remove network owned ports
             for allocation in allocated: