Terminate router
A workflow that terminates a router.
To terminate a router, the workflow terminate_router
is used. The operator is presented with an input form that
requires once again a trouble ticket number. On top of this, there is also the option whether this workflow should
remove all configuration on the router, and whether IPAM entries related to this device should be removed.
The workflow consists of the following steps:
- Deprovision IPAM resources (if selected).
- Try to remove configuration form the router (if selected).
- Commit removal of configuration (if selected).
- For Nokia devices: remove interfaces from Netbox.
- Remove the device from LibreNMS.
- For PE routers: apply the archiving license in Kentik.
- Set the subscription status to
TERMINATED
.
initial_input_form_generator(subscription_id)
Let the operator decide whether to delete configuration on the router, and clear up IPAM resources.
Source code in gso/workflows/router/terminate_router.py
deprovision_loopback_ips(subscription)
Clear up the loopback addresses from IPAM.
Source code in gso/workflows/router/terminate_router.py
remove_config_from_router_dry(subscription, process_id, tt_number)
Remove configuration from the router, first as a dry run.
Source code in gso/workflows/router/terminate_router.py
remove_config_from_router_real(subscription, process_id, tt_number)
Remove configuration from the router.
Source code in gso/workflows/router/terminate_router.py
remove_device_from_netbox(subscription)
Remove the device from Netbox.
Source code in gso/workflows/router/terminate_router.py
remove_p_from_all_pe_dry(subscription, tt_number, process_id)
Perform a dry run of removing the terminated router from all the PE routers.
Source code in gso/workflows/router/terminate_router.py
remove_p_from_all_pe_real(subscription, tt_number, process_id)
Perform a real run of removing the terminated router from all the PE routers.
Source code in gso/workflows/router/terminate_router.py
remove_pe_from_all_pe_dry(subscription, tt_number, process_id)
Perform a dry run of removing the terminated PE router from the PE router mesh.
Source code in gso/workflows/router/terminate_router.py
remove_pe_from_all_pe_real(subscription, tt_number, process_id)
Perform a real run of removing terminated PE router from PE the router mesh.
Source code in gso/workflows/router/terminate_router.py
remove_pe_from_all_p_dry(subscription, tt_number, process_id)
Perform a dry run of removing PE router from all P routers.
Source code in gso/workflows/router/terminate_router.py
remove_pe_from_all_p_real(subscription, tt_number, process_id)
Perform a real run of removing PE router from all P routers.
Source code in gso/workflows/router/terminate_router.py
remove_device_from_librenms(subscription)
Remove the device from LibreNMS.
Source code in gso/workflows/router/terminate_router.py
kentik_apply_archive_license(subscription, process_id)
Apply the archiving license to a PE router in Kentik.
This includes setting the flow rate to one flow per second, and the BGP type to none
. Service Management will also
be emailed to inform them of an archiving license being consumed. If this step is unsuccessful, an email is sent to
inform them as well. This could be caused by a device being missing in Kentik, or having no more licenses available.
Source code in gso/workflows/router/terminate_router.py
terminate_router()
Terminate a router subscription.
- Let the operator decide whether to delete IPAM resources, and remove configuration from the router
- Clear up IPAM resources, if selected by the operator
- Disable and delete configuration on the router, if selected by the operator
- Mark the subscription as terminated in the service database