From 14fb663019038b80d42f212e0ad8169cd0d37e84 Mon Sep 17 00:00:00 2001 From: Hang Yang Date: Wed, 30 Sep 2020 13:48:01 -0500 Subject: [PATCH] Add address group in use exception Related change: https://review.opendev.org/#/c/751110/ Change-Id: I2a9872890ca4d5e59a9e266c1dcacd3488a3265c --- neutron_lib/exceptions/address_group.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neutron_lib/exceptions/address_group.py b/neutron_lib/exceptions/address_group.py index 524ec902e..b6f56428a 100644 --- a/neutron_lib/exceptions/address_group.py +++ b/neutron_lib/exceptions/address_group.py @@ -20,6 +20,11 @@ class AddressGroupNotFound(exceptions.NotFound): message = _("Address group %(address_group_id)s could not be found.") +class AddressGroupInUse(exceptions.InUse): + message = _("Address group %(address_group_id)s is in use on one or more " + "security group rules.") + + class AddressesNotFound(exceptions.NotFound): message = _("Addresses %(addresses)s not found in the address group " "%(address_group_id)s.")