Replace uuid.uuid4() with uuidutils.generate_uuid()

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

Change-Id: I5d0e5523595088d934ee233c48e403f23326cee9
Closes-Bug: #1082248
This commit is contained in:
jeremy.zhang 2017-03-24 16:57:21 +08:00
parent 18758fab1a
commit 1698fa0992
1 changed files with 3 additions and 3 deletions

View File

@ -14,9 +14,9 @@
# limitations under the License.
import six
import uuid
from oslo_utils import timeutils
from oslo_utils import uuidutils
from muranoagent import exceptions as exc
@ -29,7 +29,7 @@ class ExecutionResult(object):
return {
'FormatVersion': '2.0.0',
'ID': uuid.uuid4().hex,
'ID': uuidutils.generate_uuid(dashed=False),
'SourceID': execution_plan.ID,
'Action': 'Execution:Result',
'ErrorCode': 0,
@ -55,7 +55,7 @@ class ExecutionResult(object):
return {
'FormatVersion': '2.0.0',
'ID': uuid.uuid4().hex,
'ID': uuidutils.generate_uuid(dashed=False),
'SourceID': execution_plan.ID,
'Action': 'Execution:Result',
'ErrorCode': error_code,