From afc5f997c80bb2888c8609bb78551ce5ccc11110 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Wed, 20 Apr 2022 17:36:36 +0300 Subject: 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 --- openstackclient/compute/v2/server_event.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openstackclient/compute') 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 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 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 -- cgit v1.2.1