Merge "Update uuid.uuid4() to uuidutils.generate_uuid()"

This commit is contained in:
Zuul 2018-04-05 02:28:08 +00:00 committed by Gerrit Code Review
commit 41a61eb9de
2 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ class BackupOs(object):
backups = cinder.backups.list(search_opts=search_opts) backups = cinder.backups.list(search_opts=search_opts)
if len(backups) <= 0: if len(backups) <= 0:
msg = ("Backup volume %s is failed." msg = ("Backup volume %s is failed."
"Do a full backup before incremental backup" "Do a full backup before incremental backup"
% volume_id) % volume_id)
raise Exception(msg) raise Exception(msg)
else: else:

View File

@ -15,9 +15,9 @@
from copy import copy from copy import copy
import os import os
import uuid
from freezer.tests.integration import common from freezer.tests.integration import common
from oslo_utils import uuidutils
class TestBackupFSLocalRsync(common.TestFS): class TestBackupFSLocalRsync(common.TestFS):
@ -47,7 +47,7 @@ class TestBackupFSLocalRsync(common.TestFS):
'storage': 'local', 'storage': 'local',
'engine': 'rsync', 'engine': 'rsync',
'max_segment_size': '67108864', 'max_segment_size': '67108864',
'backup_name': uuid.uuid4().hex 'backup_name': uuidutils.generate_uuid(dashed=False)
} }
restore_args = { restore_args = {
@ -84,7 +84,7 @@ class TestBackupFSLocalRsync(common.TestFS):
""" """
self.source_tree.add_random_data() self.source_tree.add_random_data()
self.assertTreesMatchNot() self.assertTreesMatchNot()
backup_name = uuid.uuid4().hex backup_name = uuidutils.generate_uuid(dashed=False)
with common.Temp_Tree() as storage_dir: with common.Temp_Tree() as storage_dir:
backup_args = { backup_args = {
@ -144,7 +144,7 @@ class TestBackupFSLocalRsync(common.TestFS):
'storage': 'local', 'storage': 'local',
'engine': 'rsync', 'engine': 'rsync',
'max_segment_size': '67108864', 'max_segment_size': '67108864',
'backup_name': uuid.uuid4().hex 'backup_name': uuidutils.generate_uuid(dashed=False)
} }
restore_args = { restore_args = {