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
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
4817665e
Verified
Commit
4817665e
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
add database migration
parent
58d7c2d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!129
Add workflow for TWAMP deployment
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/migrations/versions/2023-12-27_f0764c6f392c_add_twamp_deployment_workflow.py
+39
-0
39 additions, 0 deletions
.../2023-12-27_f0764c6f392c_add_twamp_deployment_workflow.py
with
39 additions
and
0 deletions
gso/migrations/versions/2023-12-27_f0764c6f392c_add_twamp_deployment_workflow.py
0 → 100644
+
39
−
0
View file @
4817665e
"""
Add TWAMP deployment workflow.
Revision ID: f0764c6f392c
Revises: 815033570ad7
Create Date: 2023-12-27 14:31:42.285180
"""
import
sqlalchemy
as
sa
from
alembic
import
op
# revision identifiers, used by Alembic.
revision
=
'
f0764c6f392c
'
down_revision
=
'
815033570ad7
'
branch_labels
=
None
depends_on
=
None
from
orchestrator.migrations.helpers
import
create_workflow
,
delete_workflow
new_workflows
=
[
{
"
name
"
:
"
deploy_twamp
"
,
"
target
"
:
"
MODIFY
"
,
"
description
"
:
"
Deploy TWAMP
"
,
"
product_type
"
:
"
Iptrunk
"
}
]
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