Fix tempest gate issue on FirewallNotFound exception

In case of failed tests the following error appears in
logs/screen-q-svc.txt.gz

  File "/opt/stack/new/neutron-fwaas/neutron_fwaas/db/firewall/v2/firewall_db_v2.py", line 805, in delete_firewall_group
    raise fw_ext.FirewallNotFound(firewall_id=id)
AttributeError: 'module' object has no attribute 'FirewallNotFound'

This exception doesn't exists anymore.
It has been replaced by FirewallGroupNotFound exception.

Closes-Bug: #1649703
Closes-Bug: #1657299
Change-Id: If97ae00f66479177f50be15361bce9e8c89afc3c
This commit is contained in:
Bertrand Lallau 2017-01-24 13:29:03 +01:00
parent 8e0e639137
commit 8a86782c22
1 changed files with 2 additions and 2 deletions

View File

@ -778,7 +778,7 @@ class Firewall_db_mixin_v2(fw_ext.Firewallv2PluginBase, base_db.CommonDbMixin):
count = context.session.query(
FirewallGroup).filter_by(id=id).update(fwg)
if not count:
raise fw_ext.FirewallNotFound(firewall_id=id)
raise fw_ext.FirewallGroupNotFound(firewall_id=id)
return self.get_firewall_group(context, id)
def update_firewall_group_status(self, context, id, status, not_in=None):
@ -802,7 +802,7 @@ class Firewall_db_mixin_v2(fw_ext.Firewallv2PluginBase, base_db.CommonDbMixin):
count = context.session.query(
FirewallGroup).filter_by(id=id).delete()
if not count:
raise fw_ext.FirewallNotFound(firewall_id=id)
raise fw_ext.FirewallGroupNotFound(firewall_id=id)
def get_firewall_group(self, context, id, fields=None):
LOG.debug("get_firewall_group() called")