Skip to content
Snippets Groups Projects
Commit aa70a732 authored by Neda Moeini's avatar Neda Moeini
Browse files

Make migration for modification WF

parent 891630f0
No related branches found
No related tags found
1 merge request!314Feature/vrf
This commit is part of merge request !314. Comments created here will be created in the context of that merge request.
"""Add VRF workflows..
Revision ID: 28c1723c6a00
Revises: 6103f83731bb
Create Date: 2024-11-27 14:44:57.271584
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '28c1723c6a00'
down_revision = '6103f83731bb'
branch_labels = None
depends_on = None
from orchestrator.migrations.helpers import create_workflow, delete_workflow
new_workflows = [
{
"name": "create_vrf",
"target": "CREATE",
"description": "Create VRF",
"product_type": "VRF"
},
{
"name": "modify_vrf_router_list",
"target": "MODIFY",
"description": "Modify VRF router list",
"product_type": "VRF"
}
]
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"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment