summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2
diff options
context:
space:
mode:
authorPavlo Shchelokovskyy <shchelokovskyy@gmail.com>2022-04-20 17:36:36 +0300
committerPavlo Shchelokovskyy <shchelokovskyy@gmail.com>2022-04-20 17:42:02 +0300
commitafc5f997c80bb2888c8609bb78551ce5ccc11110 (patch)
tree84d8e9f38b4828bf0577d08a7d8929f1133c962f /openstackclient/compute/v2
parentdabaec5a7b1b9786a8f91eebef738bf755faf059 (diff)
downloadpython-openstackclient-afc5f997c80bb2888c8609bb78551ce5ccc11110.tar.gz
Stop using private _is_uuid_like method
currently this double-private method of a dependency library is used in several places (openstack.cloud._utils._is_uuid_like) openstacksdk deliberatly chose not to depend on oslo.utils to keep dependenies to the minimum, so it just copied several methods from it, including the is_uuid_like. python-openstackclient however already depends on oslo.utils, so using the public method from oslo.utils should be preferred and more stable. Change-Id: I578ffa36ffb00c9d47ee12a149313201973edd32
Diffstat (limited to 'openstackclient/compute/v2')
-rw-r--r--openstackclient/compute/v2/server_event.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/compute/v2/server_event.py b/openstackclient/compute/v2/server_event.py
index 7ab0cd2f..ebf0d526 100644
--- a/openstackclient/compute/v2/server_event.py
+++ b/openstackclient/compute/v2/server_event.py
@@ -19,10 +19,10 @@ import logging
import iso8601
from novaclient import api_versions
-import openstack.cloud._utils
from osc_lib.command import command
from osc_lib import exceptions
from osc_lib import utils
+from oslo_utils import uuidutils
from openstackclient.i18n import _
@@ -152,7 +152,7 @@ class ListServerEvent(command.Lister):
# If we fail to find the resource, it is possible the server is
# deleted. Try once more using the <server> arg directly if it is a
# UUID.
- if openstack.cloud._utils._is_uuid_like(parsed_args.server):
+ if uuidutils.is_uuid_like(parsed_args.server):
server_id = parsed_args.server
else:
raise
@@ -224,7 +224,7 @@ class ShowServerEvent(command.ShowOne):
# If we fail to find the resource, it is possible the server is
# deleted. Try once more using the <server> arg directly if it is a
# UUID.
- if openstack.cloud._utils._is_uuid_like(parsed_args.server):
+ if uuidutils.is_uuid_like(parsed_args.server):
server_id = parsed_args.server
else:
raise