Incorrect handling of 404 Error in delete PM Threshold API

Bug #2023357 reported by Masaki UENO
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
In Progress
Undecided
Unassigned

Bug Description

In the current Tacker implementation (stable/2023.1), generating `404 Not Found` error in delete PM Threshold API does not correctly handled.

[1] is the point where the above bug detected.

```
        if not pm_threshold:
            raise sol_ex.PMThresholdNotExist(thresholdId=thresholdId)
```

This process generates an instance of `PMThresholdNotExist` class with `thresholdId` argument. However, the definition of this class requires `threshold_id` for its message[2].

```
class PMThresholdNotExist(SolHttpError404):
    message = _("The specified PM Threshold %(threshold_id)s does not exist.")
```

I think the below change at [1] will resolve this bug:

```
        if not pm_threshold:
            raise sol_ex.PMThresholdNotExist(threshold_id=thresholdId)
```

[1] https://github.com/openstack/tacker/blob/stable/2023.1/tacker/sol_refactored/controller/vnfpm_v2.py#L434
[2] https://github.com/openstack/tacker/blob/stable/2023.1/tacker/sol_refactored/common/exceptions.py#L411-L412

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/886246

Changed in tacker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 10.0.0.0rc1

This issue was fixed in the openstack/tacker 10.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.