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
530eed75
Commit
530eed75
authored
1 month ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
fix migration orders
parent
fcc65209
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!440
add pre-check command to get bgp status from LSO
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/cli/lso_calls.py
+5
-5
5 additions, 5 deletions
gso/cli/lso_calls.py
gso/migrations/versions/2025-06-24_06242291zb30_add_bgp_status_pre_check_table.py
+5
-5
5 additions, 5 deletions
...2025-06-24_06242291zb30_add_bgp_status_pre_check_table.py
with
10 additions
and
10 deletions
gso/cli/lso_calls.py
+
5
−
5
View file @
530eed75
...
@@ -23,7 +23,7 @@ app = typer.Typer()
...
@@ -23,7 +23,7 @@ app = typer.Typer()
def
_validate_partner
(
partner
:
str
)
->
None
:
def
_validate_partner
(
partner
:
str
)
->
None
:
if
not
filter_partners_by_name
(
name
=
partner
,
case_sensitive
=
True
):
if
not
filter_partners_by_name
(
name
=
partner
,
case_sensitive
=
True
):
typer
.
echo
(
f
"
Error: partner
'
{
partner
}
'
not found in database.
"
,
err
=
True
)
typer
.
echo
(
f
"
Error: partner
'
{
partner
}
'
not found in database.
"
)
raise
typer
.
Exit
(
1
)
raise
typer
.
Exit
(
1
)
...
@@ -42,15 +42,15 @@ def _call_lso(host: str, partner: str) -> ExecutableRunResponse:
...
@@ -42,15 +42,15 @@ def _call_lso(host: str, partner: str) -> ExecutableRunResponse:
resp
.
raise_for_status
()
resp
.
raise_for_status
()
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
exception
(
"
LSO call failed
"
)
logger
.
exception
(
"
LSO call failed
"
)
typer
.
echo
(
f
"
Error: failed to call LSO:
{
e
}
"
,
err
=
True
)
typer
.
echo
(
f
"
Error: failed to call LSO:
{
e
}
"
)
raise
typer
.
Exit
(
1
)
from
e
raise
typer
.
Exit
(
1
)
from
e
try
:
try
:
return
ExecutableRunResponse
(
**
resp
.
json
())
return
ExecutableRunResponse
(
**
resp
.
json
())
except
ValidationError
as
e
:
except
ValidationError
as
e
:
logger
.
exception
(
"
Invalid response from LSO
"
)
logger
.
exception
(
"
Invalid response from LSO
"
)
typer
.
echo
(
"
Error: invalid JSON returned by LSO:
"
,
err
=
True
)
typer
.
echo
(
"
Error: invalid JSON returned by LSO:
"
)
typer
.
echo
(
str
(
e
)
,
err
=
True
)
typer
.
echo
(
str
(
e
))
raise
typer
.
Exit
(
1
)
from
e
raise
typer
.
Exit
(
1
)
from
e
...
@@ -96,7 +96,7 @@ def _maybe_save(host: str, partner: str, exec_resp: ExecutableRunResponse) -> No
...
@@ -96,7 +96,7 @@ def _maybe_save(host: str, partner: str, exec_resp: ExecutableRunResponse) -> No
db
.
session
.
add
(
record
)
db
.
session
.
add
(
record
)
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
exception
(
"
Failed to save pre-check record
"
)
logger
.
exception
(
"
Failed to save pre-check record
"
)
typer
.
echo
(
"
Error: could not save pre-check to database.
"
,
err
=
True
)
typer
.
echo
(
"
Error: could not save pre-check to database.
"
)
raise
typer
.
Exit
(
2
)
from
e
raise
typer
.
Exit
(
2
)
from
e
typer
.
echo
(
"
Pre-check result saved.
"
)
typer
.
echo
(
"
Pre-check result saved.
"
)
...
...
This diff is collapsed.
Click to expand it.
gso/migrations/versions/2025-06-24_
e4437e8b46d5
_add_bgp_status_pre_check_table.py
→
gso/migrations/versions/2025-06-24_
06242291zb30
_add_bgp_status_pre_check_table.py
+
5
−
5
View file @
530eed75
"""
Add bgp_status_pre_checks table.
"""
Add bgp_status_pre_checks table.
Revision ID:
e4437e8b46d5
Revision ID:
06242291zb30
Revises:
7c3094cd282a
Revises:
b2b5137ef0c7
Create Date: 2025-06-24 1
3:36:23.866783
Create Date: 2025-06-24 1
1:00
"""
"""
import
sqlalchemy
as
sa
import
sqlalchemy
as
sa
...
@@ -11,8 +11,8 @@ from orchestrator.db import UtcTimestamp
...
@@ -11,8 +11,8 @@ from orchestrator.db import UtcTimestamp
from
sqlalchemy.dialects
import
postgresql
from
sqlalchemy.dialects
import
postgresql
# revision identifiers, used by Alembic.
# revision identifiers, used by Alembic.
revision
=
'
e4437e8b46d5
'
revision
=
'
06242291zb30
'
down_revision
=
'
7c3094cd282a
'
down_revision
=
'
b2b5137ef0c7
'
branch_labels
=
None
branch_labels
=
None
depends_on
=
None
depends_on
=
None
...
...
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