summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/db/utils.py
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-02-21 12:21:11 +0000
committerMark Goddard <mark@stackhpc.com>2019-02-21 12:21:11 +0000
commita094aa7e94d235914036201dad0527dc241ed583 (patch)
treee2ed2c28e0afe2ac199167b418a4f40c782104c5 /ironic/tests/unit/db/utils.py
parent8c760675d30dba4253f0d71f9292f08136a85fac (diff)
downloadironic-a094aa7e94d235914036201dad0527dc241ed583.tar.gz
Deploy Templates: Fix DB & object nits
Fix nits raised in https://review.openstack.org/#/c/627663. Change-Id: I87492119ff0b7df8bf899a175f9fa57638e6c314 Story: 1722275 Task: 28674
Diffstat (limited to 'ironic/tests/unit/db/utils.py')
-rw-r--r--ironic/tests/unit/db/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ironic/tests/unit/db/utils.py b/ironic/tests/unit/db/utils.py
index 7b6be120a..6e91643a2 100644
--- a/ironic/tests/unit/db/utils.py
+++ b/ironic/tests/unit/db/utils.py
@@ -624,13 +624,14 @@ def create_test_allocation(**kw):
def get_test_deploy_template(**kw):
+ default_uuid = uuidutils.generate_uuid()
return {
'version': kw.get('version', deploy_template.DeployTemplate.VERSION),
'created_at': kw.get('created_at'),
'updated_at': kw.get('updated_at'),
'id': kw.get('id', 234),
'name': kw.get('name', u'CUSTOM_DT1'),
- 'uuid': kw.get('uuid', 'aa75a317-2929-47d4-b676-fd9bff578bf1'),
+ 'uuid': kw.get('uuid', default_uuid),
'steps': kw.get('steps', [get_test_deploy_template_step(
deploy_template_id=kw.get('id', 234))]),
}
@@ -668,4 +669,4 @@ def create_test_deploy_template(**kw):
for kw_step, template_step in zip(kw['steps'], template['steps']):
if 'id' not in kw_step:
del template_step['id']
- return dbapi.create_deploy_template(template, template['version'])
+ return dbapi.create_deploy_template(template)