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: I8768b6c665329163cb87dc69c9fa022bdee1b65d Closes-Bug: #1082248
This commit is contained in:
parent
c4542eaaa5
commit
f1865ebdf0
@ -22,10 +22,9 @@ import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
import six
|
||||
from oslo_utils import uuidutils
|
||||
import socket
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
'''
|
||||
Expected input:
|
||||
@ -86,7 +85,7 @@ def main():
|
||||
logging.debug('[vitrage] publisher: %s, event: %s, payload %s',
|
||||
publisher, event_type, payload)
|
||||
|
||||
notifier.info(ctxt={'message_id': six.text_type(uuid.uuid4()),
|
||||
notifier.info(ctxt={'message_id': uuidutils.generate_uuid(),
|
||||
'publisher_id': publisher,
|
||||
'timestamp': datetime.utcnow()},
|
||||
event_type=event_type,
|
||||
|
Loading…
Reference in New Issue
Block a user