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
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
de8a8ff7
Commit
de8a8ff7
authored
8 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Fix rebase conflicts.
parent
03755cf5
No related branches found
No related tags found
No related merge requests found
Pipeline
#87895
failed
8 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/router/update_ibgp_mesh.py
+1
-59
1 addition, 59 deletions
gso/workflows/router/update_ibgp_mesh.py
with
1 addition
and
59 deletions
gso/workflows/router/update_ibgp_mesh.py
+
1
−
59
View file @
de8a8ff7
...
...
@@ -13,12 +13,11 @@ from orchestrator.workflows.utils import wrap_modify_initial_input_form
from
pydantic
import
ConfigDict
,
model_validator
from
gso.products.product_types.router
import
Router
from
gso.services
import
librenms_client
,
lso_client
from
gso.services
import
librenms_client
,
lso_client
,
subscriptions
from
gso.services.lso_client
import
lso_interaction
from
gso.services.subscriptions
import
get_trunks_that_terminate_on_router
from
gso.utils.helpers
import
SNMPVersion
from
gso.utils.workflow_steps
import
add_all_pe_to_p_dry
,
add_all_pe_to_p_real
from
gso.utils.workflow_steps
import
calculate_pe_router_list
,
generate_inventory
def
initial_input_form_generator
(
subscription_id
:
UUIDstr
)
->
FormGenerator
:
...
...
@@ -85,63 +84,6 @@ def add_p_to_mesh_real(subscription: dict[str, Any], callback_route: str, tt_num
extra_vars
=
extra_vars
,
)
@step
(
"
[DRY RUN] Add all PE routers to P router iBGP table
"
)
def
add_all_pe_to_p_dry
(
subscription
:
dict
[
str
,
Any
],
pe_router_list
:
list
[
Router
],
callback_route
:
str
,
tt_number
:
str
,
process_id
:
UUIDstr
)
->
None
:
"""
Perform a dry run of adding the list of all PE routers to the new P router.
"""
extra_vars
=
{
"
dry_run
"
:
True
,
"
subscription
"
:
subscription
,
"
pe_router_list
"
:
{
router
.
router
.
router_fqdn
:
{
"
lo4
"
:
str
(
router
.
router
.
router_lo_ipv4_address
),
"
lo6
"
:
str
(
router
.
router
.
router_lo_ipv6_address
),
"
vendor
"
:
router
.
router
.
vendor
,
}
for
router
in
pe_router_list
},
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
- Update iBGP mesh
"
,
"
verb
"
:
"
add_pe_to_p
"
,
}
lso_client
.
execute_playbook
(
playbook_name
=
"
update_ibgp_mesh.yaml
"
,
callback_route
=
callback_route
,
inventory
=
subscription
[
"
router
"
][
"
router_fqdn
"
],
extra_vars
=
extra_vars
,
)
@step
(
"
[FOR REAL] Add all PE routers to P router iBGP table
"
)
def
add_all_pe_to_p_real
(
subscription
:
dict
[
str
,
Any
],
pe_router_list
:
list
[
Router
],
callback_route
:
str
,
tt_number
:
str
,
process_id
:
UUIDstr
)
->
None
:
"""
Add the list of all PE routers to the new P router.
"""
extra_vars
=
{
"
dry_run
"
:
False
,
"
subscription
"
:
subscription
,
"
pe_router_list
"
:
{
router
.
router
.
router_fqdn
:
{
"
lo4
"
:
str
(
router
.
router
.
router_lo_ipv4_address
),
"
lo6
"
:
str
(
router
.
router
.
router_lo_ipv6_address
),
"
vendor
"
:
router
.
router
.
vendor
,
}
for
router
in
pe_router_list
},
"
commit_comment
"
:
f
"
GSO_PROCESS_ID:
{
process_id
}
- TT_NUMBER:
{
tt_number
}
- Update iBGP mesh
"
,
"
verb
"
:
"
add_pe_to_p
"
,
}
lso_client
.
execute_playbook
(
playbook_name
=
"
update_ibgp_mesh.yaml
"
,
callback_route
=
callback_route
,
inventory
=
subscription
[
"
router
"
][
"
router_fqdn
"
],
extra_vars
=
extra_vars
,
)
@step
(
"
Verify iBGP session health
"
)
def
check_ibgp_session
(
subscription
:
Router
,
callback_route
:
str
)
->
None
:
"""
Run a playbook using the provisioning proxy, to check the health of the new iBGP session.
"""
...
...
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