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
GitLab 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
0e6acfa8
Commit
0e6acfa8
authored
7 months ago
by
Aleksandr Kurbatov
Browse files
Options
Downloads
Patches
Plain Diff
`workflow_steps` - SDP functions reworked
parent
d9442f98
No related branches found
No related tags found
1 merge request
!399
Rework of SDP steps
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/utils/workflow_steps.py
+19
-11
19 additions, 11 deletions
gso/utils/workflow_steps.py
with
19 additions
and
11 deletions
gso/utils/workflow_steps.py
+
19
−
11
View file @
0e6acfa8
...
@@ -50,11 +50,7 @@ def _deploy_base_config(
...
@@ -50,11 +50,7 @@ def _deploy_base_config(
def
_update_sdp_mesh
(
def
_update_sdp_mesh
(
subscription
:
dict
[
str
,
Any
],
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
,
*
,
dry_run
:
bool
,
verb
:
str
tt_number
:
str
,
process_id
:
UUIDstr
,
*
,
dry_run
:
bool
,
)
->
LSOState
:
)
->
LSOState
:
inventory
=
generate_inventory_for_routers
(
inventory
=
generate_inventory_for_routers
(
router_role
=
RouterRole
.
PE
,
router_vendor
=
Vendor
.
NOKIA
,
exclude_routers
=
[
subscription
[
"
router
"
][
"
router_fqdn
"
]]
router_role
=
RouterRole
.
PE
,
router_vendor
=
Vendor
.
NOKIA
,
exclude_routers
=
[
subscription
[
"
router
"
][
"
router_fqdn
"
]]
...
@@ -65,7 +61,7 @@ def _update_sdp_mesh(
...
@@ -65,7 +61,7 @@ def _update_sdp_mesh(
"
subscription
"
:
subscription
,
"
subscription
"
:
subscription
,
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
-
"
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
-
"
f
"
Update the SDP mesh for L2circuits(epipes) config on PE NOKIA routers
"
,
f
"
Update the SDP mesh for L2circuits(epipes) config on PE NOKIA routers
"
,
"
verb
"
:
"
update_sdp_mesh
"
,
"
verb
"
:
verb
,
"
pe_router_list
"
:
{
"
pe_router_list
"
:
{
subscription
[
"
router
"
][
"
router_fqdn
"
]:
{
subscription
[
"
router
"
][
"
router_fqdn
"
]:
{
"
lo4
"
:
str
(
subscription
[
"
router
"
][
"
router_lo_ipv4_address
"
]),
"
lo4
"
:
str
(
subscription
[
"
router
"
][
"
router_lo_ipv4_address
"
]),
...
@@ -93,7 +89,7 @@ def _update_sdp_single_pe(
...
@@ -93,7 +89,7 @@ def _update_sdp_single_pe(
"
subscription
"
:
subscription
,
"
subscription
"
:
subscription
,
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
-
"
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
-
"
f
"
Update the SDP mesh for L2circuits(epipes) config on PE NOKIA routers
"
,
f
"
Update the SDP mesh for L2circuits(epipes) config on PE NOKIA routers
"
,
"
verb
"
:
"
update
_sdp_mesh
"
,
"
verb
"
:
"
add_pe_to
_sdp_mesh
"
,
"
pe_router_list
"
:
generate_inventory_for_routers
(
"
pe_router_list
"
:
generate_inventory_for_routers
(
router_role
=
RouterRole
.
PE
,
router_role
=
RouterRole
.
PE
,
exclude_routers
=
[
subscription
[
"
router
"
][
"
router_fqdn
"
]],
exclude_routers
=
[
subscription
[
"
router
"
][
"
router_fqdn
"
]],
...
@@ -288,15 +284,27 @@ def add_pe_mesh_to_pe_real(subscription: dict[str, Any], tt_number: str, process
...
@@ -288,15 +284,27 @@ def add_pe_mesh_to_pe_real(subscription: dict[str, Any], tt_number: str, process
@step
(
"
[DRY RUN] Include the PE into SDP mesh on other Nokia PEs
"
)
@step
(
"
[DRY RUN] Include the PE into SDP mesh on other Nokia PEs
"
)
def
update_sdp_mesh_dry
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
def
add_pe_to_sdp_mesh_dry
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
"""
Perform a dry run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
True
,
verb
=
"
add_pe_to_sdp_mesh
"
)
@step
(
"
[FOR REAL] Include the PE into SDP mesh on other Nokia PEs
"
)
def
add_pe_to_sdp_mesh_real
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
"""
Perform a real run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
False
,
verb
=
"
add_pe_to_sdp_mesh
"
)
@step
(
"
[DRY RUN] Include the PE into SDP mesh on other Nokia PEs
"
)
def
remove_pe_from_sdp_mesh_dry
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
"""
Perform a dry run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
"""
Perform a dry run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
True
)
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
True
,
verb
=
"
remove_pe_from_sdp_mesh
"
)
@step
(
"
[FOR REAL] Include the PE into SDP mesh on other Nokia PEs
"
)
@step
(
"
[FOR REAL] Include the PE into SDP mesh on other Nokia PEs
"
)
def
update
_sdp_mesh_real
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
def
remove_pe_from
_sdp_mesh_real
(
subscription
:
dict
[
str
,
Any
],
tt_number
:
str
,
process_id
:
UUIDstr
)
->
State
:
"""
Perform a real run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
"""
Perform a real run of including new PE router in SDP mesh on other NOKIA PE routers.
"""
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
False
)
return
_update_sdp_mesh
(
subscription
,
tt_number
,
process_id
,
dry_run
=
False
,
verb
=
"
remove_pe_from_sdp_mesh
"
)
@step
(
"
[DRY RUN] Configure SDP on the PE to all other Nokia PEs
"
)
@step
(
"
[DRY RUN] Configure SDP on the PE to all other Nokia PEs
"
)
...
...
...
...
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
sign in
to comment