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

Add migration for L2Circuit's workflows.

parent 6760de58
No related branches found
No related tags found
1 merge request!307Feature/l2circuits
"""Add L2Circuit workflows..
Revision ID: 72a4f7aa499d
Revises: 5132c463214d
Create Date: 2024-10-29 14:04:29.807253
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '72a4f7aa499d'
down_revision = '5132c463214d'
branch_labels = None
depends_on = None
from orchestrator.migrations.helpers import create_workflow, delete_workflow
new_workflows = [
{
"name": "create_layer_2_circuit",
"target": "CREATE",
"description": "Create Layer 2 Circuit Service",
"product_type": "Layer2Circuit"
},
{
"name": "modify_layer_2_circuit",
"target": "MODIFY",
"description": "Modify Layer 2 Circuit Service",
"product_type": "Layer2Circuit"
}
]
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