Identity: Deprecate find_region()

Regions don't actually have a name attribute, so this isn't particularly
useful.

Change-Id: If01a8016821cfe7fb4b4a544d3d2908003086b92
Signed-off-by: ArtofBugs <oweng@osuosl.org>
This commit is contained in:
ArtofBugs
2025-11-19 14:00:07 -08:00
parent 1f56f48243
commit 32734dbb7e

View File

@@ -11,6 +11,7 @@
# under the License.
import typing as ty
import warnings
import openstack.exceptions as exception
from openstack.identity.v3 import (
@@ -59,6 +60,7 @@ from openstack.identity.v3 import user as _user
from openstack import proxy
from openstack import resource
from openstack import utils
from openstack import warnings as os_warnings
class Proxy(proxy.Proxy):
@@ -1123,6 +1125,11 @@ class Proxy(proxy.Proxy):
attempting to find a nonexistent region.
:returns: One :class:`~openstack.identity.v3.region.Region` or None
"""
warnings.warn(
"find_region is deprecated and will be removed in a future "
"release; please use get_region instead.",
os_warnings.RemovedInSDK60Warning,
)
return self._find(
_region.Region, name_or_id, ignore_missing=ignore_missing
)