Skip to content

Commit a538e86

Browse files
author
Thomas van der Ven
committed
Updated migration to add reconcile workflow for L2VPN to db
1 parent 9efa511 commit a538e86

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""Reconcile workflows L2VPN.
2+
3+
Revision ID: 0e8d17ce0f06
4+
Revises: d946c20663d3
5+
Create Date: 2025-08-28 13:02:03.796540
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
12+
# revision identifiers, used by Alembic.
13+
revision = "0e8d17ce0f06"
14+
down_revision = "d946c20663d3"
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
from orchestrator.migrations.helpers import create_workflow, delete_workflow
20+
21+
new_workflows = [
22+
{
23+
"name": "reconcile_l2vpn",
24+
"target": "RECONCILE",
25+
"description": "Reconcile SN8 L2Vpn",
26+
"product_type": "L2vpn",
27+
}
28+
]
29+
30+
31+
def upgrade() -> None:
32+
conn = op.get_bind()
33+
for workflow in new_workflows:
34+
create_workflow(conn, workflow)
35+
36+
37+
def downgrade() -> None:
38+
conn = op.get_bind()
39+
for workflow in new_workflows:
40+
delete_workflow(conn, workflow["name"])

0 commit comments

Comments
 (0)