diff --git a/gso/oss-params-example.json b/gso/oss-params-example.json index a1bbe5d0054d9dbfbaeb9290fd68bc69c2cfa90f..95ad8c021835e62c43107c193da8b2b135ee95b2 100644 --- a/gso/oss-params-example.json +++ b/gso/oss-params-example.json @@ -123,5 +123,8 @@ }, "SENTRY": { "DSN": "https://sentry-dsn-url" + }, + "MOODI": { + "host": "moodi.test.gap.geant.org" } } diff --git a/gso/settings.py b/gso/settings.py index b7b62186c100b31154c70d626883caece02f93b1..0979dcb3a700da9c26fc6f35ebd40356b471ee4c 100644 --- a/gso/settings.py +++ b/gso/settings.py @@ -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: diff --git a/gso/utils/workflow_steps.py b/gso/utils/workflow_steps.py index 6d7a166fcf37cab608201376ccad23f52c0f0832..1cbd0fd93b01e0b538fe8608865b9103d9cc03be 100644 --- a/gso/utils/workflow_steps.py +++ b/gso/utils/workflow_steps.py @@ -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, + } diff --git a/gso/workflows/iptrunk/create_iptrunk.py b/gso/workflows/iptrunk/create_iptrunk.py index ae3c6a74a54054b6a4fe07cd2cef9e9ee75ff3fa..e10401186d3731923dc92d398bc93a0d617465fb 100644 --- a/gso/workflows/iptrunk/create_iptrunk.py +++ b/gso/workflows/iptrunk/create_iptrunk.py @@ -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, } diff --git a/gso/workflows/iptrunk/deploy_twamp.py b/gso/workflows/iptrunk/deploy_twamp.py index b43de54c60885b130c9ad57d8bc5a3adf435c084..dbbe55ee61553c802113c1548f71f48559bf1e9a 100644 --- a/gso/workflows/iptrunk/deploy_twamp.py +++ b/gso/workflows/iptrunk/deploy_twamp.py @@ -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": { diff --git a/gso/workflows/iptrunk/migrate_iptrunk.py b/gso/workflows/iptrunk/migrate_iptrunk.py index 3c04fb8e03213eb218f6fc0f230b1b5b504343e5..5a7cafb03dad77270754cdb9da8a1c57ba84182e 100644 --- a/gso/workflows/iptrunk/migrate_iptrunk.py +++ b/gso/workflows/iptrunk/migrate_iptrunk.py @@ -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": { diff --git a/gso/workflows/iptrunk/modify_isis_metric.py b/gso/workflows/iptrunk/modify_isis_metric.py index d95a6eb633000cce5238e044d747743b77295f8a..7d77510728354e40b9cd8a1424672a9fc499d4b9 100644 --- a/gso/workflows/iptrunk/modify_isis_metric.py +++ b/gso/workflows/iptrunk/modify_isis_metric.py @@ -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": { diff --git a/gso/workflows/iptrunk/modify_trunk_interface.py b/gso/workflows/iptrunk/modify_trunk_interface.py index 0dcc5d83cafecd34161ca2a2b272804c35e85a0b..16de246238a40f40341cf2911b59471cb956df8b 100644 --- a/gso/workflows/iptrunk/modify_trunk_interface.py +++ b/gso/workflows/iptrunk/modify_trunk_interface.py @@ -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": { diff --git a/gso/workflows/iptrunk/terminate_iptrunk.py b/gso/workflows/iptrunk/terminate_iptrunk.py index 549bc3c23c6de32a8a8cb1cf8f1fd667aea9813b..9b5cf71a88011e68f2cda4202a6e92e3e381b31e 100644 --- a/gso/workflows/iptrunk/terminate_iptrunk.py +++ b/gso/workflows/iptrunk/terminate_iptrunk.py @@ -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": { diff --git a/gso/workflows/iptrunk/validate_iptrunk.py b/gso/workflows/iptrunk/validate_iptrunk.py index 7832487fba8cddcbef46247ed8ac85f0cc5a3dd1..4ca96f8b6ad70a7e6201174827632b4bad12b0d3 100644 --- a/gso/workflows/iptrunk/validate_iptrunk.py +++ b/gso/workflows/iptrunk/validate_iptrunk.py @@ -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": { diff --git a/gso/workflows/router/promote_p_to_pe.py b/gso/workflows/router/promote_p_to_pe.py index 101e4c65c5cddc0ecd8695ce2de4809362775177..a82b4823f4374772ef2b5365f3f57ea56fad1017 100644 --- a/gso/workflows/router/promote_p_to_pe.py +++ b/gso/workflows/router/promote_p_to_pe.py @@ -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, } diff --git a/gso/workflows/router/terminate_router.py b/gso/workflows/router/terminate_router.py index 56f927d8fafd06f54400b1ff34e34bade725a901..9bc48f8ce9943692f8c475b1595d33e9964645f7 100644 --- a/gso/workflows/router/terminate_router.py +++ b/gso/workflows/router/terminate_router.py @@ -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, } diff --git a/gso/workflows/router/update_ibgp_mesh.py b/gso/workflows/router/update_ibgp_mesh.py index e79c0274e173ebccd23e5d3834eea5ed6c77e9b2..298c0878a2f82449173c78d24604e82ae8eb5bb1 100644 --- a/gso/workflows/router/update_ibgp_mesh.py +++ b/gso/workflows/router/update_ibgp_mesh.py @@ -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": {}, } diff --git a/gso/workflows/router/validate_router.py b/gso/workflows/router/validate_router.py index ab6e3059f5b2e61ef0371290c115bf0be76cf41c..2403c52f6813ad12517ae2ccf2e32b134ced6d03 100644 --- a/gso/workflows/router/validate_router.py +++ b/gso/workflows/router/validate_router.py @@ -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,