summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/db/utils.py
diff options
context:
space:
mode:
authorTzu-Mainn Chen <tzumainn@redhat.com>2019-11-21 21:27:36 +0000
committerTzu-Mainn Chen <tzumainn@redhat.com>2019-12-10 19:00:33 +0000
commit3fbb560af1e4d53e701c423311e4d01cb5b1f62a (patch)
tree34cbfbc05105f09efa2914e7ab1f714e66206d62 /ironic/tests/unit/db/utils.py
parent306aaccca6f47b986c725b02fba16c4a414eacbc (diff)
downloadironic-3fbb560af1e4d53e701c423311e4d01cb5b1f62a.tar.gz
Add owner to allocations and create relevant policies
Add an owner to allocations. Depending on policy, a non-admin can then create an allocation and have the owner set to their project. Allocation processing then respects the owner. Change-Id: I2965a4a601b9fa2c0212097da37b104a3e5514df Story: #2006506 Task: #37540
Diffstat (limited to 'ironic/tests/unit/db/utils.py')
-rw-r--r--ironic/tests/unit/db/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic/tests/unit/db/utils.py b/ironic/tests/unit/db/utils.py
index 3ac498bd5..81a46d89a 100644
--- a/ironic/tests/unit/db/utils.py
+++ b/ironic/tests/unit/db/utils.py
@@ -595,6 +595,7 @@ def get_test_allocation(**kw):
'updated_at': kw.get('updated_at'),
'uuid': kw.get('uuid', uuidutils.generate_uuid()),
'version': kw.get('version', allocation.Allocation.VERSION),
+ 'owner': kw.get('owner', None),
}