From 4de17b34ab8935999341ff24c42049d5d15c2f17 Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Wed, 4 Oct 2023 13:43:45 +0200 Subject: [PATCH] update all workflows to use the new pattern for pp_interaction --- gso/workflows/iptrunk/create_iptrunk.py | 12 ++++++------ gso/workflows/iptrunk/migrate_iptrunk.py | 18 +++++++++--------- gso/workflows/iptrunk/modify_isis_metric.py | 4 ++-- .../iptrunk/modify_trunk_interface.py | 4 ++-- gso/workflows/iptrunk/terminate_iptrunk.py | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/gso/workflows/iptrunk/create_iptrunk.py b/gso/workflows/iptrunk/create_iptrunk.py index 4f428fca..5f02a8c9 100644 --- a/gso/workflows/iptrunk/create_iptrunk.py +++ b/gso/workflows/iptrunk/create_iptrunk.py @@ -344,12 +344,12 @@ def create_iptrunk() -> StepList: >> initialize_subscription >> get_info_from_ipam >> reserve_interfaces_in_netbox - >> pp_interaction(provision_ip_trunk_iface_dry, 3) - >> pp_interaction(provision_ip_trunk_iface_real, 3) - >> pp_interaction(check_ip_trunk_connectivity, 2, False) - >> pp_interaction(provision_ip_trunk_isis_iface_dry, 3) - >> pp_interaction(provision_ip_trunk_isis_iface_real, 3) - >> pp_interaction(check_ip_trunk_isis, 2, False) + >> pp_interaction(provision_ip_trunk_iface_dry, "Provision IPtrunk interface [DRY RUN]") + >> pp_interaction(provision_ip_trunk_iface_real, "Provision IPtrunk interface [FOR REAL]") + >> pp_interaction(check_ip_trunk_connectivity, "Check IPtrunk connectivity") + >> pp_interaction(provision_ip_trunk_isis_iface_dry, "Provision ISIS interface [DRY RUN]") + >> pp_interaction(provision_ip_trunk_isis_iface_real, "Provision ISIS interface [FOR REAL]") + >> pp_interaction(check_ip_trunk_isis, "Validate IPtrunk") >> allocate_interfaces_in_netbox >> set_status(SubscriptionLifecycle.ACTIVE) >> resync diff --git a/gso/workflows/iptrunk/migrate_iptrunk.py b/gso/workflows/iptrunk/migrate_iptrunk.py index ef69a304..18a57cf1 100644 --- a/gso/workflows/iptrunk/migrate_iptrunk.py +++ b/gso/workflows/iptrunk/migrate_iptrunk.py @@ -506,17 +506,17 @@ def migrate_iptrunk() -> StepList: >> store_process_subscription(Target.MODIFY) >> unsync >> reserve_interfaces_in_netbox - >> pp_interaction(set_isis_to_90000, 3) - >> pp_interaction(disable_old_config_dry, 3) - >> pp_interaction(disable_old_config_real, 3) - >> pp_interaction(deploy_new_config_dry, 3) - >> pp_interaction(deploy_new_config_real, 3) + >> pp_interaction(set_isis_to_90000, "Set ISIS metric to 90.000") + >> pp_interaction(disable_old_config_dry, "Disable old configuration [DRY RUN]") + >> pp_interaction(disable_old_config_real, "Disable old configuration [FOR REAL]") + >> pp_interaction(deploy_new_config_dry, "Deploy new configuration [DRY RUN]") + >> pp_interaction(deploy_new_config_real, "Deploy new configuration [FOR REAL]") >> confirm_continue_move_fiber - >> pp_interaction(deploy_new_isis, 3) + >> pp_interaction(deploy_new_isis, "Deploy new ISIS interface") >> confirm_continue_restore_isis - >> pp_interaction(restore_isis_metric, 3) - >> pp_interaction(delete_old_config_dry, 3) - >> pp_interaction(delete_old_config_real, 3) + >> pp_interaction(restore_isis_metric, "Restore original ISIS metric") + >> pp_interaction(delete_old_config_dry, "Delete old configuration [DRY RUN]") + >> pp_interaction(delete_old_config_real, "Delete old configuration [FOR REAL]") >> update_ipam >> update_subscription_model >> update_netbox diff --git a/gso/workflows/iptrunk/modify_isis_metric.py b/gso/workflows/iptrunk/modify_isis_metric.py index f43447c8..dedbb365 100644 --- a/gso/workflows/iptrunk/modify_isis_metric.py +++ b/gso/workflows/iptrunk/modify_isis_metric.py @@ -62,8 +62,8 @@ def modify_isis_metric() -> StepList: >> store_process_subscription(Target.MODIFY) >> unsync >> modify_iptrunk_subscription - >> pp_interaction(provision_ip_trunk_isis_iface_dry, 3) - >> pp_interaction(provision_ip_trunk_isis_iface_real, 3) + >> pp_interaction(provision_ip_trunk_isis_iface_dry, "Provision ISIS interface [DRY RUN]") + >> pp_interaction(provision_ip_trunk_isis_iface_real, "Provision ISIS interface [FOR REAL]") >> resync >> done ) diff --git a/gso/workflows/iptrunk/modify_trunk_interface.py b/gso/workflows/iptrunk/modify_trunk_interface.py index 26d9c9cc..6a94ac67 100644 --- a/gso/workflows/iptrunk/modify_trunk_interface.py +++ b/gso/workflows/iptrunk/modify_trunk_interface.py @@ -279,8 +279,8 @@ def modify_trunk_interface() -> StepList: >> unsync >> modify_iptrunk_subscription >> update_interfaces_in_netbox - >> pp_interaction(provision_ip_trunk_iface_dry, 3) - >> pp_interaction(provision_ip_trunk_iface_real, 3) + >> pp_interaction(provision_ip_trunk_iface_dry, "Provision IPtrunk interface [DRY RUN]") + >> pp_interaction(provision_ip_trunk_iface_real, "Provision IPtrunk interface [FOR REAL") >> allocate_interfaces_in_netbox >> resync >> done diff --git a/gso/workflows/iptrunk/terminate_iptrunk.py b/gso/workflows/iptrunk/terminate_iptrunk.py index c0a0da62..3cd0f744 100644 --- a/gso/workflows/iptrunk/terminate_iptrunk.py +++ b/gso/workflows/iptrunk/terminate_iptrunk.py @@ -83,9 +83,9 @@ def terminate_iptrunk() -> StepList: config_steps = ( init - >> pp_interaction(set_isis_to_90000, 3) - >> pp_interaction(deprovision_ip_trunk_dry, 3) - >> pp_interaction(deprovision_ip_trunk_real, 3) + >> pp_interaction(set_isis_to_90000, "Set ISIS metric to 90.000") + >> pp_interaction(deprovision_ip_trunk_dry, "Deprovision IPtrunk [DRY RUN]") + >> pp_interaction(deprovision_ip_trunk_real, "Deprovision IPtrunk [FOR REAL]") ) ipam_steps = init >> deprovision_ip_trunk_ipv4 >> deprovision_ip_trunk_ipv6 -- GitLab