Merge "Stop using private _is_uuid_like method"
This commit is contained in:
commit
9b399c5528
@ -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
|
||||
|
@ -21,7 +21,6 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import openstack.cloud._utils
|
||||
from openstack.image import image_signer
|
||||
from osc_lib.api import utils as api_utils
|
||||
from osc_lib.cli import format_columns
|
||||
@ -29,6 +28,7 @@ from osc_lib.cli import parseractions
|
||||
from osc_lib.command import command
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from openstackclient.common import progressbar
|
||||
from openstackclient.i18n import _
|
||||
@ -159,7 +159,7 @@ class AddProjectToImage(command.ShowOne):
|
||||
image_client = self.app.client_manager.image
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if openstack.cloud._utils._is_uuid_like(parsed_args.project):
|
||||
if uuidutils.is_uuid_like(parsed_args.project):
|
||||
project_id = parsed_args.project
|
||||
else:
|
||||
project_id = common.find_project(
|
||||
|
Loading…
x
Reference in New Issue
Block a user