Replaces uuid.uuid4 with uuidutils.generate_uuid()

Openstack common has a wrapper for generating uuids.We should
use that function when generating uuids for consistency.

Change-Id: I9e7d8a1fcfb3b378b2ab397a0ba932d7aac17e26
Closes-Bug: #1082248
This commit is contained in:
Luong Anh Tuan 2016-12-05 14:20:00 +07:00 committed by Vincent Llorens
parent a1657004eb
commit 0b2d254ff5

View File

@ -1,8 +1,8 @@
import copy
import six
import uuid
from datetime import datetime
from oslo_utils import uuidutils
__author__ = "Lisa Zangrando"
@ -25,7 +25,7 @@ permissions and limitations under the License."""
def generate_request_id():
return 'req-' + str(uuid.uuid4())
return 'req-' + uuidutils.generate_uuid()
class RequestContext(object):