Skip to content
Snippets Groups Projects
Commit bb4fe1fc authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

add moodi start and stop steps

parent 8b8b95d5
Branches
Tags
1 merge request!291add moodi start and stop steps
Showing
with 116 additions and 74 deletions
......@@ -123,5 +123,8 @@
},
"SENTRY": {
"DSN": "https://sentry-dsn-url"
},
"MOODI": {
"host": "moodi.test.gap.geant.org"
}
}
......@@ -211,6 +211,12 @@ class SentryParams(BaseSettings):
DSN: str
class MoodiParams(BaseSettings):
"""Settings for Moodi."""
host: str
class OSSParams(BaseSettings):
"""The set of parameters required for running :term:`GSO`."""
......@@ -225,6 +231,7 @@ class OSSParams(BaseSettings):
SHAREPOINT: SharepointParams
KENTIK: KentikParams
SENTRY: SentryParams | None = None
MOODI: MoodiParams
def load_oss_params() -> OSSParams:
......
......@@ -35,7 +35,7 @@ def _deploy_base_config(
}
return {
"playbook_name": "base_config.yaml",
"playbook_name": "gap_ansible/playbooks/base_config.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -67,7 +67,7 @@ def _update_sdp_mesh(
}
return {
"playbook_name": "update_pe_sdp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_pe_sdp_mesh.yaml",
"inventory": inventory,
"extra_vars": extra_vars,
}
......@@ -100,7 +100,7 @@ def _update_sdp_single_pe(
}
return {
"playbook_name": "update_pe_sdp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_pe_sdp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -132,7 +132,7 @@ def _add_pe_mesh_to_pe(
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -157,7 +157,7 @@ def _add_pe_to_pe_mesh(
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": inventory,
"extra_vars": extra_vars,
}
......@@ -188,7 +188,7 @@ def _add_all_p_to_pe(
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -213,7 +213,7 @@ def _add_pe_to_all_p(
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": inventory,
"extra_vars": extra_vars,
}
......@@ -320,7 +320,7 @@ def set_isis_to_max(subscription: Iptrunk, process_id: UUIDstr, tt_number: str)
return {
"subscription": subscription,
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -338,7 +338,7 @@ def set_isis_to_max(subscription: Iptrunk, process_id: UUIDstr, tt_number: str)
def run_checks_after_base_config(subscription: dict[str, Any]) -> LSOState:
"""Workflow step for running show commands after installing base config."""
return {
"playbook_name": "base_config_checks.yaml",
"playbook_name": "gap_ansible/playbooks/base_config_checks.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": {"wfo_router_json": subscription},
}
......@@ -354,7 +354,7 @@ def check_pe_ibgp(subscription: dict[str, Any]) -> LSOState:
}
return {
"playbook_name": "check_ibgp.yaml",
"playbook_name": "gap_ansible/playbooks/check_ibgp.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -370,7 +370,7 @@ def check_l3_services(subscription: dict[str, Any]) -> LSOState:
}
return {
"playbook_name": "check_l3_services.yaml",
"playbook_name": "gap_ansible/playbooks/check_l3_services.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -389,3 +389,35 @@ def prompt_sharepoint_checklist_url(checklist_url: str) -> FormGenerator:
yield SharepointPrompt
return {}
@step("Start Moodi")
def start_moodi(subscription: dict[str, Any]) -> LSOState:
"""Start monitoring on demand using Moodi Telemetry stack."""
return {
"playbook_name": "moodi_telemetry/playbooks/start_moodi.yaml",
"inventory": {
"all": {
"hosts": {
"moodi.test.gap.geant.org": None
}
}
},
"extra_vars": {"subscription": subscription},
}
@step("Stop Moodi")
def stop_moodi() -> LSOState:
"""Stop monitoring on demand."""
return {
"playbook_name": "moodi_telemetry/playbooks/stop_moodi.yaml",
"inventory": {
"all": {
"hosts": {
"moodi.test.gap.geant.org": None
}
}
},
"extra_vars": None,
}
......@@ -337,7 +337,7 @@ def provision_ip_trunk_iface_dry(subscription: IptrunkInactive, process_id: UUID
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -363,7 +363,7 @@ def provision_ip_trunk_iface_real(subscription: IptrunkInactive, process_id: UUI
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -382,7 +382,7 @@ def check_ip_trunk_connectivity(subscription: IptrunkInactive) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "ping"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {"all": {"hosts": {subscription.iptrunk.iptrunk_sides[0].iptrunk_side_node.router_fqdn: None}}},
"extra_vars": extra_vars,
}
......@@ -401,7 +401,7 @@ def provision_ip_trunk_isis_iface_dry(subscription: IptrunkInactive, process_id:
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -427,7 +427,7 @@ def provision_ip_trunk_isis_iface_real(subscription: IptrunkInactive, process_id
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -446,7 +446,7 @@ def check_ip_trunk_isis(subscription: IptrunkInactive) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "isis"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {"all": {"hosts": {subscription.iptrunk.iptrunk_sides[0].iptrunk_side_node.router_fqdn: None}}},
"extra_vars": extra_vars,
}
......
......@@ -44,7 +44,7 @@ def deploy_twamp_dry(subscription: Iptrunk, process_id: UUIDstr, tt_number: str)
}
return {
"playbook_name": "deploy_twamp.yaml",
"playbook_name": "gap_ansible/playbooks/deploy_twamp.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -69,7 +69,7 @@ def deploy_twamp_real(subscription: Iptrunk, process_id: UUIDstr, tt_number: str
}
return {
"playbook_name": "deploy_twamp.yaml",
"playbook_name": "gap_ansible/playbooks/deploy_twamp.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -91,7 +91,7 @@ def check_twamp_status(subscription: Iptrunk) -> LSOState:
}
return {
"playbook_name": "deploy_twamp.yaml",
"playbook_name": "gap_ansible/playbooks/deploy_twamp.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -208,7 +208,7 @@ def check_ip_trunk_optical_levels_pre(subscription: Iptrunk) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "optical_pre"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -235,7 +235,7 @@ def check_ip_trunk_optical_levels_post(
}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -262,7 +262,7 @@ def check_ip_trunk_lldp(
}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -300,7 +300,7 @@ def disable_old_config_dry(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -339,7 +339,7 @@ def disable_old_config_real(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -378,7 +378,7 @@ def deploy_new_config_dry(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -417,7 +417,7 @@ def deploy_new_config_real(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -447,7 +447,7 @@ def update_remaining_side_bfd_dry(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -475,7 +475,7 @@ def update_remaining_side_bfd_real(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -497,7 +497,7 @@ def check_ip_trunk_bfd(subscription: Iptrunk, new_node: Router, replace_index: i
}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -529,7 +529,7 @@ def check_ip_trunk_connectivity(subscription: Iptrunk, replace_index: int) -> LS
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "ping"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -566,7 +566,7 @@ def deploy_new_isis(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -586,7 +586,7 @@ def check_ip_trunk_isis(subscription: Iptrunk, replace_index: int) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "isis"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -631,7 +631,7 @@ def restore_isis_metric(
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -669,7 +669,7 @@ def delete_old_config_dry(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -708,7 +708,7 @@ def delete_old_config_real(
}
return {
"playbook_name": "iptrunks_migration.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_migration.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -49,7 +49,7 @@ def provision_ip_trunk_isis_iface_dry(subscription: Iptrunk, process_id: UUIDstr
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -75,7 +75,7 @@ def provision_ip_trunk_isis_iface_real(subscription: Iptrunk, process_id: UUIDst
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -191,7 +191,7 @@ def check_ip_trunk_connectivity(subscription: Iptrunk) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "ping"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -209,7 +209,7 @@ def check_ip_trunk_lldp(subscription: Iptrunk) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "lldp"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -321,7 +321,7 @@ def provision_ip_trunk_iface_dry(
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/gap_ansible/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -350,7 +350,7 @@ def provision_ip_trunk_iface_real(
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -464,7 +464,7 @@ def check_ip_trunk_optical_levels_post(subscription: Iptrunk) -> LSOState:
extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "optical_post"}
return {
"playbook_name": "iptrunks_checks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks_checks.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -63,7 +63,7 @@ def deprovision_ip_trunk_dry(subscription: Iptrunk, process_id: UUIDstr, tt_numb
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -89,7 +89,7 @@ def deprovision_ip_trunk_real(subscription: Iptrunk, process_id: UUIDstr, tt_num
}
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -23,7 +23,7 @@ def validate_router_config(subscription: Iptrunk) -> LSOState:
extra_vars = {"wfo_trunk_json": json.loads(json_dumps(subscription)), "verb": "validate"}
return {
"playbook_name": "base_config.yaml",
"playbook_name": "gap_ansible/playbooks/base_config.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -137,7 +137,7 @@ def verify_netbox_entries(subscription: Iptrunk) -> None:
def verify_iptrunk_config(subscription: Iptrunk) -> LSOState:
"""Check for configuration drift on the relevant routers."""
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -160,7 +160,7 @@ def verify_iptrunk_config(subscription: Iptrunk) -> LSOState:
def check_ip_trunk_isis(subscription: Iptrunk) -> LSOState:
"""Run an Ansible playbook to check for any :term:`ISIS` configuration drift."""
return {
"playbook_name": "iptrunks.yaml",
"playbook_name": "gap_ansible/playbooks/iptrunks.yaml",
"inventory": {
"all": {
"hosts": {
......@@ -183,7 +183,7 @@ def check_ip_trunk_isis(subscription: Iptrunk) -> LSOState:
def verify_twamp_config(subscription: Iptrunk) -> LSOState:
"""Check for configuration drift of TWAMP."""
return {
"playbook_name": "deploy_twamp.yaml",
"playbook_name": "gap_ansible/playbooks/deploy_twamp.yaml",
"inventory": {
"all": {
"hosts": {
......
......@@ -72,7 +72,7 @@ def set_isis_overload(subscription: dict[str, Any], tt_number: str, process_id:
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -91,7 +91,7 @@ def deploy_pe_base_config_dry(subscription: dict[str, Any], tt_number: str, proc
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -110,7 +110,7 @@ def deploy_pe_base_config_real(subscription: dict[str, Any], tt_number: str, pro
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -176,7 +176,7 @@ def remove_p_from_pe_dry(subscription: dict[str, Any], tt_number: str, process_i
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -194,7 +194,7 @@ def remove_p_from_pe_real(subscription: dict[str, Any], tt_number: str, process_
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -211,7 +211,7 @@ def deploy_routing_instances_dry(subscription: dict[str, Any], tt_number: str, p
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -228,7 +228,7 @@ def deploy_routing_instances_real(subscription: dict[str, Any], tt_number: str,
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -245,7 +245,7 @@ def remove_isis_overload(subscription: dict[str, Any], tt_number: str, process_i
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -271,7 +271,7 @@ def delete_default_routes_dry(subscription: dict[str, Any], tt_number: str, proc
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -289,7 +289,7 @@ def delete_default_routes_real(subscription: dict[str, Any], tt_number: str, pro
}
return {
"playbook_name": "promote_p_to_pe.yaml",
"playbook_name": "gap_ansible/playbooks/promote_p_to_pe.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......
......@@ -80,7 +80,7 @@ def remove_config_from_router_dry(subscription: Router, process_id: UUIDstr, tt_
}
return {
"playbook_name": "base_config.yaml",
"playbook_name": "gap_ansible/playbooks/base_config.yaml",
"inventory": {"all": {"hosts": {subscription.router.router_fqdn: None}}},
"extra_vars": extra_vars,
}
......@@ -98,7 +98,7 @@ def remove_config_from_router_real(subscription: Router, process_id: UUIDstr, tt
}
return {
"playbook_name": "base_config.yaml",
"playbook_name": "gap_ansible/playbooks/base_config.yaml",
"inventory": {"all": {"hosts": {subscription.router.router_fqdn: None}}},
"extra_vars": extra_vars,
}
......@@ -123,7 +123,7 @@ def remove_p_from_all_pe_dry(subscription: Router, tt_number: str, process_id: U
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -141,7 +141,7 @@ def remove_p_from_all_pe_real(subscription: Router, tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -159,7 +159,7 @@ def remove_pe_from_all_pe_dry(subscription: Router, tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(
RouterRole.PE, exclude_routers=[subscription.router.router_fqdn]
),
......@@ -179,7 +179,7 @@ def remove_pe_from_all_pe_real(subscription: Router, tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(
RouterRole.PE, exclude_routers=[subscription.router.router_fqdn]
),
......@@ -199,7 +199,7 @@ def remove_pe_from_all_p_dry(subscription: Router, tt_number: str, process_id: U
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.P),
"extra_vars": extra_vars,
}
......@@ -217,7 +217,7 @@ def remove_pe_from_all_p_real(subscription: Router, tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.P),
"extra_vars": extra_vars,
}
......
......@@ -78,7 +78,7 @@ def add_p_to_mesh_dry(subscription: dict[str, Any], tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -95,7 +95,7 @@ def add_p_to_mesh_real(subscription: dict[str, Any], tt_number: str, process_id:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": generate_inventory_for_active_routers(RouterRole.PE),
"extra_vars": extra_vars,
}
......@@ -112,7 +112,7 @@ def add_all_pe_to_p_dry(subscription: dict[str, Any]) -> LSOState:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -130,7 +130,7 @@ def add_all_pe_to_p_real(subscription: dict[str, Any], tt_number: str, process_i
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -140,7 +140,7 @@ def add_all_pe_to_p_real(subscription: dict[str, Any], tt_number: str, process_i
def check_ibgp_session(subscription: Router) -> LSOState:
"""Run a playbook using the provisioning proxy, to check the health of the new iBGP session."""
return {
"playbook_name": "check_ibgp.yaml",
"playbook_name": "gap_ansible/playbooks/check_ibgp.yaml",
"inventory": {"all": {"hosts": {subscription.router.router_fqdn: None}}},
"extra_vars": {},
}
......
......@@ -64,7 +64,7 @@ def verify_p_ibgp(subscription: dict[str, Any]) -> LSOState:
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"playbook_name": "gap_ansible/playbooks/update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": extra_vars,
}
......@@ -100,7 +100,7 @@ def check_kentik_entry_exists(subscription: Router) -> None:
def verify_base_config(subscription: dict[str, Any]) -> LSOState:
"""Workflow step for running a playbook that checks whether base config has drifted."""
return {
"playbook_name": "base_config.yaml",
"playbook_name": "gap_ansible/playbooks/base_config.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": {
"wfo_router_json": subscription,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment