Skip to content
Snippets Groups Projects
Commit 34ecda72 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Updates to workflow_steps and promote_p_to_pe

parent 59e350ea
No related branches found
No related tags found
1 merge request!267SDP mesh functions
Pipeline #89449 failed
"""Workflow steps that are shared across multiple workflows.""" """Workflow steps that are shared across multiple workflows."""
import json import json
from operator import inv
from typing import Any from typing import Any
from orchestrator import inputstep, step from orchestrator import inputstep, step
......
...@@ -200,7 +200,6 @@ def remove_p_from_pe_real(subscription: dict[str, Any], tt_number: str, process_ ...@@ -200,7 +200,6 @@ def remove_p_from_pe_real(subscription: dict[str, Any], tt_number: str, process_
} }
@step("[DRY RUN] Deploy routing instances") @step("[DRY RUN] Deploy routing instances")
def deploy_routing_instances_dry(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState: def deploy_routing_instances_dry(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
"""Perform a dry run of deploying routing instances.""" """Perform a dry run of deploying routing instances."""
...@@ -260,27 +259,6 @@ def update_subscription_model(subscription: Router) -> State: ...@@ -260,27 +259,6 @@ def update_subscription_model(subscription: Router) -> State:
return {"subscription": subscription} return {"subscription": subscription}
@step("[DRY RUN] Add all P to this new PE")
def add_all_p_to_pe_dry(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
"""Perform a dry run of adding all P routers to the PE router."""
extra_vars = {
"dry_run": True,
"subscription": subscription,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Add all P-routers to this new PE",
"verb": "add_all_p_to_pe",
"p_router_list": generate_inventory_for_active_routers(
RouterRole.P, exclude_routers=[subscription["router"]["router_fqdn"]]
)["all"]["hosts"],
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
@step("[DRY RUN] Delete default routes") @step("[DRY RUN] Delete default routes")
def delete_default_routes_dry(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState: def delete_default_routes_dry(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
"""Perform a dry run of deleting the default routes.""" """Perform a dry run of deleting the default routes."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment