From 39871109ca39e28041735c22ea02b4acc60e10bf Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Mon, 11 Feb 2019 17:20:37 -0600 Subject: [PATCH] Remove NOTEs about _RE_INV_IN_USE The nova report client used to scrape the error message text to determine whether a 409 represented an "inventory in use" scenario. As of the dependency, it properly uses the error code instead. This change removes notes that reference the now-dead regular expression. Depends-On: https://review.openstack.org/568639 Change-Id: Id56a975481f360a6ddacb64c424c1c9bf49449cc --- placement/exception.py | 2 -- placement/handlers/inventory.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/placement/exception.py b/placement/exception.py index 7f7c8c2ae..b5901ff90 100644 --- a/placement/exception.py +++ b/placement/exception.py @@ -112,8 +112,6 @@ class InvalidInventoryCapacityReservedCanBeTotal(InvalidInventoryCapacity): # An exception with this name is used on both sides of the placement/ # nova interaction. class InventoryInUse(InvalidInventory): - # NOTE(mriedem): This message cannot change without impacting the - # nova.scheduler.client.report._RE_INV_IN_USE regex. msg_fmt = _("Inventory for '%(resource_classes)s' on " "resource provider '%(resource_provider)s' in use.") diff --git a/placement/handlers/inventory.py b/placement/handlers/inventory.py index a2a85d5a4..21cf3db16 100644 --- a/placement/handlers/inventory.py +++ b/placement/handlers/inventory.py @@ -402,8 +402,6 @@ def delete_inventories(req): % {'rp_uuid': resource_provider.uuid}, comment=errors.CONCURRENT_UPDATE) except exception.InventoryInUse as ex: - # NOTE(mriedem): This message cannot change without impacting the - # nova.scheduler.client.report._RE_INV_IN_USE regex. raise webob.exc.HTTPConflict(ex.format_message(), comment=errors.INVENTORY_INUSE)