Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
aa70a732
Commit
aa70a732
authored
5 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Make migration for modification WF
parent
891630f0
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!314
Feature/vrf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/migrations/versions/2024-11-27_28c1723c6a00_add_vrf_workflows.py
+45
-0
45 additions, 0 deletions
...ons/versions/2024-11-27_28c1723c6a00_add_vrf_workflows.py
with
45 additions
and
0 deletions
gso/migrations/versions/2024-11-27_28c1723c6a00_add_vrf_workflows.py
0 → 100644
+
45
−
0
View file @
aa70a732
"""
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
"
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment