summaryrefslogtreecommitdiff
path: root/ironic/db/sqlalchemy/models.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/db/sqlalchemy/models.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/db/sqlalchemy/models.py')
-rw-r--r--ironic/db/sqlalchemy/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic/db/sqlalchemy/models.py b/ironic/db/sqlalchemy/models.py
index f9dcf467e..4554eba90 100644
--- a/ironic/db/sqlalchemy/models.py
+++ b/ironic/db/sqlalchemy/models.py
@@ -340,6 +340,7 @@ class Allocation(Base):
name = Column(String(255), nullable=True)
node_id = Column(Integer, ForeignKey('nodes.id'), nullable=True)
state = Column(String(15), nullable=False)
+ owner = Column(String(255), nullable=True)
last_error = Column(Text, nullable=True)
resource_class = Column(String(80), nullable=True)
traits = Column(db_types.JsonEncodedList)