From e4732e137525bc5a34724c11a998a553c490dff9 Mon Sep 17 00:00:00 2001 From: zhuzeyu Date: Thu, 24 Nov 2016 18:50:49 +0800 Subject: [PATCH] Use uuidutils instead of uuid.uuid4(). Change-Id: I3f734b6c4d252f8eb73a49b447fd89e5e444002f Closes-Bug: #1082248 --- .../services/infra_optim/v1/json/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/watcher_tempest_plugin/services/infra_optim/v1/json/client.py b/watcher_tempest_plugin/services/infra_optim/v1/json/client.py index dd9111f53..ee434d98b 100644 --- a/watcher_tempest_plugin/services/infra_optim/v1/json/client.py +++ b/watcher_tempest_plugin/services/infra_optim/v1/json/client.py @@ -15,8 +15,7 @@ # limitations under the License. from oslo_serialization import jsonutils -import uuid - +from watcher.common import utils from watcher_tempest_plugin.services.infra_optim import base @@ -69,7 +68,7 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient): parameters = {k: v for k, v in kwargs.items() if v is not None} # This name is unique to avoid the DB unique constraint on names - unique_name = 'Tempest Audit Template %s' % uuid.uuid4() + unique_name = 'Tempest Audit Template %s' % utils.generate_uuid() audit_template = { 'name': parameters.get('name', unique_name),