Merge "Fix error message when deleting a non-existing AZ"

This commit is contained in:
Zuul 2024-11-13 10:32:18 +00:00 committed by Gerrit Code Review
commit 6067907fcd
2 changed files with 12 additions and 3 deletions

View File

@ -111,6 +111,8 @@ def _find_resource(list_funct, resource_name, root_tag, name, parent=None):
raise osc_exc.CommandError(msg)
# Try by ID next
# Availability Zones don't support the id parameter
if resource_name != "availability_zones":
resource = list_funct(*parent_args, id=name)[root_tag]
if len(resource) == 1:
return resource[0]

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixed the incorrect error message returned when deleting a non-existing
availability zone, it now explicitly mentions that the availability zone
does not exist.