Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSO
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
LSO
Commits
04bbc9dc
Verified
Commit
04bbc9dc
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
remove import typing
parent
901e0145
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!50
remove import typing
Pipeline
#84201
passed
1 year ago
Stage: tox
Stage: documentation
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lso/routes/ip_trunk.py
+5
-7
5 additions, 7 deletions
lso/routes/ip_trunk.py
lso/routes/router.py
+1
-2
1 addition, 2 deletions
lso/routes/router.py
with
6 additions
and
9 deletions
lso/routes/ip_trunk.py
+
5
−
7
View file @
04bbc9dc
"""
Routes for handling events related to the IP trunk service.
"""
from
os
import
path
from
typing
import
Optional
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
HttpUrl
...
...
@@ -30,7 +29,7 @@ class IPTrunkProvisioningParams(IPTrunkParams):
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
#: The type of object that is changed.
object
:
str
...
...
@@ -40,7 +39,7 @@ class IPTrunkModifyParams(IPTrunkParams):
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
#: The old subscription object, represented as a dictionary. This allows
#: for calculating the difference in subscriptions.
old_subscription
:
dict
...
...
@@ -51,7 +50,7 @@ class IPTrunkMigrationParams(IPTrunkParams):
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
#: The new Router that this IP Trunk is migrating to.
new_side
:
dict
#: An Ansible playbook verb that is passed along for indicating the phase of the migration that is performed.
...
...
@@ -72,7 +71,7 @@ class IPTrunkDeleteParams(IPTrunkParams):
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
@router.post
(
"
/
"
)
...
...
@@ -217,8 +216,7 @@ def migrate_ip_trunk(params: IPTrunkMigrationParams) -> PlaybookLaunchResponse:
"
verb
"
:
params
.
verb
,
"
config_object
"
:
params
.
config_object
,
"
dry_run
"
:
str
(
params
.
dry_run
),
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
params
.
process_id
}
"
f
"
- TT_NUMBER:
{
params
.
tt_number
}
"
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
params
.
process_id
}
- TT_NUMBER:
{
params
.
tt_number
}
"
f
"
- Deploy config for
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
,
}
...
...
This diff is collapsed.
Click to expand it.
lso/routes/router.py
+
1
−
2
View file @
04bbc9dc
"""
Routes for handling device/base_config-related requests.
"""
import
os
from
typing
import
Optional
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
HttpUrl
...
...
@@ -29,7 +28,7 @@ class NodeProvisioningParams(BaseModel):
subscription
:
dict
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
#: Trouble Ticket number that is associated with the deployment.
tt_number
:
str
#: The process ID generated by workflow orchestrator, used for the commit comment in the routers.
...
...
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