Skip to content
Snippets Groups Projects

Feature/add validation workflows

Merged Karel van Klink requested to merge feature/add-validation-workflows into develop
9 files
+ 95
12
Compare changes
  • Side-by-side
  • Inline
Files
9
"""Add router validation task.
Revision ID: 6c986f219e3f
Revises: f0764c6f392c
Create Date: 2023-09-22 17:13:01.223133
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '6c986f219e3f'
down_revision = 'f0764c6f392c'
branch_labels = None
depends_on = None
from orchestrator.migrations.helpers import create_workflow, delete_workflow
new_workflows = [
{
"name": "validate_router",
"target": "SYSTEM",
"description": "Validate router configuration",
"product_type": "Router"
}
]
def upgrade() -> None:
conn = op.get_bind()
for workflow in new_workflows:
create_workflow(conn, workflow)
def downgrade() -> None:
conn = op.get_bind()
for workflow in new_workflows:
delete_workflow(conn, workflow["name"])
Loading