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
61e92862
Commit
61e92862
authored
1 year ago
by
Aleksandr Kurbatov
Committed by
Karel van Klink
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Trunk migration checks
parent
6f9be959
No related branches found
No related tags found
1 merge request
!177
Trunk migration checks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/iptrunk/migrate_iptrunk.py
+58
-0
58 additions, 0 deletions
gso/workflows/iptrunk/migrate_iptrunk.py
with
58 additions
and
0 deletions
gso/workflows/iptrunk/migrate_iptrunk.py
+
58
−
0
View file @
61e92862
...
@@ -220,6 +220,24 @@ def calculate_old_side_data(subscription: Iptrunk, replace_index: int) -> State:
...
@@ -220,6 +220,24 @@ def calculate_old_side_data(subscription: Iptrunk, replace_index: int) -> State:
return
{
"
old_side_data
"
:
old_side_data
}
return
{
"
old_side_data
"
:
old_side_data
}
@step
(
"
Check Optical levels on the trunk endpoint
"
)
def
check_ip_trunk_optical_levels
(
subscription
:
Iptrunk
,
callback_route
:
str
,
)
->
State
:
"""
Check Optical levels on the trunk.
"""
extra_vars
=
{
"
wfo_ip_trunk_json
"
:
json
.
loads
(
json_dumps
(
subscription
)),
"
check
"
:
"
optical
"
}
execute_playbook
(
playbook_name
=
"
iptrunks_checks.yaml
"
,
callback_route
=
callback_route
,
inventory
=
subscription
.
iptrunk
.
iptrunk_sides
[
1
-
replace_index
].
iptrunk_side_node
.
router_fqdn
,
extra_vars
=
extra_vars
,
)
return
{
"
subscription
"
:
subscription
}
@step
(
"
[DRY RUN] Disable configuration on old router
"
)
@step
(
"
[DRY RUN] Disable configuration on old router
"
)
def
disable_old_config_dry
(
def
disable_old_config_dry
(
subscription
:
Iptrunk
,
subscription
:
Iptrunk
,
...
@@ -385,6 +403,24 @@ def confirm_continue_move_fiber() -> FormGenerator:
...
@@ -385,6 +403,24 @@ def confirm_continue_move_fiber() -> FormGenerator:
return
{}
return
{}
@step
(
"
Check IP connectivity of the trunk
"
)
def
check_ip_trunk_connectivity
(
subscription
:
Iptrunk
,
callback_route
:
str
,
)
->
State
:
"""
Check successful connectivity across the new trunk.
"""
extra_vars
=
{
"
wfo_ip_trunk_json
"
:
json
.
loads
(
json_dumps
(
subscription
)),
"
check
"
:
"
ping
"
}
execute_playbook
(
playbook_name
=
"
iptrunks_checks.yaml
"
,
callback_route
=
callback_route
,
inventory
=
subscription
.
iptrunk
.
iptrunk_sides
[
1
-
replace_index
].
iptrunk_side_node
.
router_fqdn
,
extra_vars
=
extra_vars
,
)
return
{
"
subscription
"
:
subscription
}
@step
(
"
Deploy ISIS configuration on new router
"
)
@step
(
"
Deploy ISIS configuration on new router
"
)
def
deploy_new_isis
(
def
deploy_new_isis
(
subscription
:
Iptrunk
,
subscription
:
Iptrunk
,
...
@@ -422,6 +458,24 @@ def deploy_new_isis(
...
@@ -422,6 +458,24 @@ def deploy_new_isis(
return
{
"
subscription
"
:
subscription
}
return
{
"
subscription
"
:
subscription
}
@step
(
"
Check ISIS adjacency
"
)
def
check_ip_trunk_isis
(
subscription
:
Iptrunk
,
callback_route
:
str
,
)
->
State
:
"""
Run an Ansible playbook to confirm :term:`ISIS` adjacency.
"""
extra_vars
=
{
"
wfo_ip_trunk_json
"
:
json
.
loads
(
json_dumps
(
subscription
)),
"
check
"
:
"
isis
"
}
execute_playbook
(
playbook_name
=
"
iptrunks_checks.yaml
"
,
callback_route
=
callback_route
,
inventory
=
subscription
.
iptrunk
.
iptrunk_sides
[
1
-
replace_index
].
iptrunk_side_node
.
router_fqdn
,
extra_vars
=
extra_vars
,
)
return
{
"
subscription
"
:
subscription
}
@inputstep
(
"
Wait for confirmation
"
,
assignee
=
Assignee
.
SYSTEM
)
@inputstep
(
"
Wait for confirmation
"
,
assignee
=
Assignee
.
SYSTEM
)
def
confirm_continue_restore_isis
()
->
FormGenerator
:
def
confirm_continue_restore_isis
()
->
FormGenerator
:
"""
Wait for an operator to confirm that the old :term:`ISIS` metric should be restored.
"""
"""
Wait for an operator to confirm that the old :term:`ISIS` metric should be restored.
"""
...
@@ -657,12 +711,16 @@ def migrate_iptrunk() -> StepList:
...
@@ -657,12 +711,16 @@ def migrate_iptrunk() -> StepList:
>>
new_side_is_nokia
(
netbox_reserve_interfaces
)
>>
new_side_is_nokia
(
netbox_reserve_interfaces
)
>>
calculate_old_side_data
>>
calculate_old_side_data
>>
pp_interaction
(
set_isis_to_max
)
>>
pp_interaction
(
set_isis_to_max
)
>>
pp_interaction
(
check_ip_trunk_optical_levels
)
>>
pp_interaction
(
disable_old_config_dry
)
>>
pp_interaction
(
disable_old_config_dry
)
>>
pp_interaction
(
disable_old_config_real
)
>>
pp_interaction
(
disable_old_config_real
)
>>
pp_interaction
(
deploy_new_config_dry
)
>>
pp_interaction
(
deploy_new_config_dry
)
>>
pp_interaction
(
deploy_new_config_real
)
>>
pp_interaction
(
deploy_new_config_real
)
>>
confirm_continue_move_fiber
>>
confirm_continue_move_fiber
>>
pp_interaction
(
check_ip_trunk_optical_levels
)
>>
pp_interaction
(
check_ip_trunk_connectivity
)
>>
pp_interaction
(
deploy_new_isis
)
>>
pp_interaction
(
deploy_new_isis
)
>>
pp_interaction
(
check_ip_trunk_isis
)
>>
should_restore_isis_metric
(
confirm_continue_restore_isis
)
>>
should_restore_isis_metric
(
confirm_continue_restore_isis
)
>>
should_restore_isis_metric
(
pp_interaction
(
restore_isis_metric
))
>>
should_restore_isis_metric
(
pp_interaction
(
restore_isis_metric
))
>>
pp_interaction
(
delete_old_config_dry
)
>>
pp_interaction
(
delete_old_config_dry
)
...
...
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