summaryrefslogtreecommitdiff
path: root/ironic/db
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2018-07-03 19:26:13 +0100
committerJulia Kreger <juliaashleykreger@gmail.com>2018-07-10 13:10:24 -0700
commitf5a5af32a3a3abcb540a2c9c5b516df783c1dce2 (patch)
tree41c9338189063d6e68a98900925ba391584c9c93 /ironic/db
parentd29dab27ef9af9c2278dce3b1f5adbfa3e6d0006 (diff)
downloadironic-f5a5af32a3a3abcb540a2c9c5b516df783c1dce2.tar.gz
Deploy steps - DB model
Adds a 'deploy_step' column to the nodes table. Co-Authored-By: Ruby Loo <rloo@oath.com> Change-Id: I31286266f28b1fdcdfeb6002992f4eece25c6ac1 Story: #1753128 Task: #22592
Diffstat (limited to 'ironic/db')
-rw-r--r--ironic/db/sqlalchemy/alembic/versions/b9117ac17882_add_node_deploy_step.py33
-rw-r--r--ironic/db/sqlalchemy/models.py1
2 files changed, 34 insertions, 0 deletions
diff --git a/ironic/db/sqlalchemy/alembic/versions/b9117ac17882_add_node_deploy_step.py b/ironic/db/sqlalchemy/alembic/versions/b9117ac17882_add_node_deploy_step.py
new file mode 100644
index 000000000..6d2b286b3
--- /dev/null
+++ b/ironic/db/sqlalchemy/alembic/versions/b9117ac17882_add_node_deploy_step.py
@@ -0,0 +1,33 @@
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""add deploy_step to node
+
+Revision ID: b9117ac17882
+Revises: fb3f10dd262e
+Create Date: 2018-06-19 22:31:45.668156
+
+"""
+
+from alembic import op
+import sqlalchemy as sa
+
+# revision identifiers, used by Alembic.
+revision = 'b9117ac17882'
+down_revision = 'fb3f10dd262e'
+
+
+def upgrade():
+ op.add_column('nodes', sa.Column('deploy_step', sa.Text(),
+ nullable=True))
diff --git a/ironic/db/sqlalchemy/models.py b/ironic/db/sqlalchemy/models.py
index f548758dc..f7ca076c8 100644
--- a/ironic/db/sqlalchemy/models.py
+++ b/ironic/db/sqlalchemy/models.py
@@ -144,6 +144,7 @@ class Node(Base):
driver_info = Column(db_types.JsonEncodedDict)
driver_internal_info = Column(db_types.JsonEncodedDict)
clean_step = Column(db_types.JsonEncodedDict)
+ deploy_step = Column(db_types.JsonEncodedDict)
resource_class = Column(String(80), nullable=True)
raid_config = Column(db_types.JsonEncodedDict)