Use uuidutils instead of uuid.uuid4().

Change-Id: I3f734b6c4d252f8eb73a49b447fd89e5e444002f
Closes-Bug: #1082248
This commit is contained in:
zhuzeyu 2016-11-24 18:50:49 +08:00
parent 3f8e4451f5
commit e4732e1375

View File

@ -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),