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
Merge requests
!231
Added more steps in router termination including:
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added more steps in router termination including:
feature/NAT-578-update-ibgp-mesh-on-terminating-router
into
develop
Overview
6
Commits
11
Pipelines
12
Changes
2
Merged
Neda Moeini
requested to merge
feature/NAT-578-update-ibgp-mesh-on-terminating-router
into
develop
11 months ago
Overview
6
Commits
11
Pipelines
12
Changes
2
Expand
Remove the terminated router from iGEANT/iGEANT6 on all the PEs
Remove the terminated router from iGEANT_P_ONLY/iGEANT_P_ONLY_6 on all Ps
Remove router from LibreNMS
0
0
Merge request reports
Compare
develop
version 11
8ac8442a
11 months ago
version 10
48a24740
11 months ago
version 9
d22bfa85
11 months ago
version 8
b6adc338
11 months ago
version 7
d46123a2
11 months ago
version 6
f6d3b383
11 months ago
version 5
452ef15f
11 months ago
version 4
e22a5e43
11 months ago
version 3
d380b39c
11 months ago
version 2
de8a8ff7
11 months ago
version 1
03755cf5
11 months ago
develop (base)
and
version 3
latest version
9d5834b2
11 commits,
11 months ago
version 11
8ac8442a
10 commits,
11 months ago
version 10
48a24740
9 commits,
11 months ago
version 9
d22bfa85
9 commits,
11 months ago
version 8
b6adc338
8 commits,
11 months ago
version 7
d46123a2
7 commits,
11 months ago
version 6
f6d3b383
6 commits,
11 months ago
version 5
452ef15f
5 commits,
11 months ago
version 4
e22a5e43
4 commits,
11 months ago
version 3
d380b39c
3 commits,
11 months ago
version 2
de8a8ff7
2 commits,
11 months ago
version 1
03755cf5
1 commit,
11 months ago
2 files
+
197
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
gso/utils/workflow_steps.py
+
40
−
0
Options
@@ -12,7 +12,9 @@ from pydantic_forms.core import FormPage
from
pydantic_forms.types
import
FormGenerator
from
pydantic_forms.validators
import
Label
from
gso.products.product_blocks.router
import
RouterRole
from
gso.products.product_types.iptrunk
import
Iptrunk
from
gso.products.product_types.router
import
Router
from
gso.services
import
lso_client
,
subscriptions
from
gso.settings
import
load_oss_params
@@ -160,3 +162,41 @@ def add_all_pe_to_p_real(
inventory
=
subscription
[
"
router
"
][
"
router_fqdn
"
],
extra_vars
=
extra_vars
,
)
@step
(
"
Calculate list of all active PE routers
"
)
def
calculate_pe_router_list
()
->
State
:
"""
Calculate a list of all active PE routers in the network.
"""
all_routers
=
[
Router
.
from_subscription
(
r
[
"
subscription_id
"
])
for
r
in
subscriptions
.
get_active_router_subscriptions
()
]
all_pe_routers
=
[
router
for
router
in
all_routers
if
router
.
router
.
router_role
==
RouterRole
.
PE
]
return
{
"
pe_router_list
"
:
all_pe_routers
}
@step
(
"
Calculate list of all active P routers
"
)
def
calculate_p_router_list
()
->
State
:
"""
Calculate a list of all active P routers in the network.
"""
all_routers
=
[
Router
.
from_subscription
(
r
[
"
subscription_id
"
])
for
r
in
subscriptions
.
get_active_router_subscriptions
()
]
all_pe_routers
=
[
router
for
router
in
all_routers
if
router
.
router
.
router_role
==
RouterRole
.
P
]
return
{
"
pe_router_list
"
:
all_pe_routers
}
def
generate_inventory
(
router_list
:
list
[
Router
])
->
dict
[
str
,
Any
]:
"""
Generate an Ansible-compatible inventory for executing playbooks. Contains all active routers.
"""
return
{
"
all
"
:
{
"
hosts
"
:
{
router
.
router
.
router_fqdn
:
{
"
lo4
"
:
str
(
router
.
router
.
router_lo_ipv4_address
),
"
lo6
"
:
str
(
router
.
router
.
router_lo_ipv6_address
),
"
vendor
"
:
str
(
router
.
router
.
vendor
),
}
for
router
in
router_list
}
},
}
Loading