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
No related branches found
No related tags found
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.
"""
"""
Routes for handling events related to the IP trunk service.
"""
from
os
import
path
from
os
import
path
from
typing
import
Optional
from
fastapi
import
APIRouter
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
HttpUrl
from
pydantic
import
BaseModel
,
HttpUrl
...
@@ -30,7 +29,7 @@ class IPTrunkProvisioningParams(IPTrunkParams):
...
@@ -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,
#: 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.
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
#: The type of object that is changed.
#: The type of object that is changed.
object
:
str
object
:
str
...
@@ -40,7 +39,7 @@ class IPTrunkModifyParams(IPTrunkParams):
...
@@ -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,
#: 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.
#: 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
#: The old subscription object, represented as a dictionary. This allows
#: for calculating the difference in subscriptions.
#: for calculating the difference in subscriptions.
old_subscription
:
dict
old_subscription
:
dict
...
@@ -51,7 +50,7 @@ class IPTrunkMigrationParams(IPTrunkParams):
...
@@ -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,
#: 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.
#: 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.
#: The new Router that this IP Trunk is migrating to.
new_side
:
dict
new_side
:
dict
#: An Ansible playbook verb that is passed along for indicating the phase of the migration that is performed.
#: 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):
...
@@ -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,
#: 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.
#: also making it an optional parameter.
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
bool
|
None
=
True
@router.post
(
"
/
"
)
@router.post
(
"
/
"
)
...
@@ -217,8 +216,7 @@ def migrate_ip_trunk(params: IPTrunkMigrationParams) -> PlaybookLaunchResponse:
...
@@ -217,8 +216,7 @@ def migrate_ip_trunk(params: IPTrunkMigrationParams) -> PlaybookLaunchResponse:
"
verb
"
:
params
.
verb
,
"
verb
"
:
params
.
verb
,
"
config_object
"
:
params
.
config_object
,
"
config_object
"
:
params
.
config_object
,
"
dry_run
"
:
str
(
params
.
dry_run
),
"
dry_run
"
:
str
(
params
.
dry_run
),
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
params
.
process_id
}
"
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
params
.
process_id
}
- TT_NUMBER:
{
params
.
tt_number
}
"
f
"
- TT_NUMBER:
{
params
.
tt_number
}
"
f
"
- Deploy config for
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
,
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.
"""
"""
Routes for handling device/base_config-related requests.
"""
import
os
import
os
from
typing
import
Optional
from
fastapi
import
APIRouter
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
HttpUrl
from
pydantic
import
BaseModel
,
HttpUrl
...
@@ -29,7 +28,7 @@ class NodeProvisioningParams(BaseModel):
...
@@ -29,7 +28,7 @@ class NodeProvisioningParams(BaseModel):
subscription
:
dict
subscription
:
dict
#: Whether this playbook execution should be a dry run, or run for real. Defaults to ``True`` for obvious reasons,
#: 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.
#: 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.
#: Trouble Ticket number that is associated with the deployment.
tt_number
:
str
tt_number
:
str
#: The process ID generated by workflow orchestrator, used for the commit comment in the routers.
#: 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