Create iptrunk
A creation workflow that deploys a new IP trunk service.
This the workflow that brings the subscription from INACTIVE
to PROVISIONING
. The deployment of a new IP trunk
consist in the following steps:
- Fill the form with the necessary fields:
- SID
- Type
- Speed
- Nodes
- LAG interfaces with description
- LAG members with description
- WFO will query IPAM to retrieve the IPv4/IPv6 Networks necessary for the trunk. The container to use is specified in
oss-params.json
- The configuration necessary to deploy the LAG is generated and applied to the destination nodes using the Ansible
playbook
iptrunks.yaml
This is done first in a dry mode (without committing) and then in a real mode committing the configuration. The commit message has thesubscription_id
and theprocess_id
. Included in this, is the configuration necessary to enable LLDP on the physical interfaces. - Once the LAG interface is deployed, another Ansible playbook is called to verify that IP traffic can actually flow
over the trunk (
iptrunk_checks.yaml
) - Once the check is passed, the ISIS configuration will take place using the same
iptrunks.yaml
. Also in this case first there is a dry run and then a commit. - After this step the ISIS adjacency gets checked using
iptrunks_checks.yaml
The trunk is deployed with an initial ISIS metric of 90.000 to prevent traffic to pass.
initial_input_form_generator(product_name)
Gather input from the user in three steps. General information, and information on both sides of the trunk.
Source code in gso/workflows/iptrunk/create_iptrunk.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
create_subscription(product, partner)
Create a new subscription object in the database.
Source code in gso/workflows/iptrunk/create_iptrunk.py
get_info_from_ipam(subscription)
Allocate IP resources in IPAM.
Source code in gso/workflows/iptrunk/create_iptrunk.py
check_existing_trunk_allocations(subscription)
Check if there already is a trunk with the same network resources assigned to it.
Source code in gso/workflows/iptrunk/create_iptrunk.py
dig_all_hosts_v4(new_ipv4_network)
Check if any hosts have already been assigned inside the IPv4 network in Netbox.
Source code in gso/workflows/iptrunk/create_iptrunk.py
dig_all_hosts_v6(new_ipv6_network)
Check if any hosts have already been assigned inside the IPv6 network in Netbox.
Source code in gso/workflows/iptrunk/create_iptrunk.py
ping_all_hosts_v4(new_ipv4_network)
Ping all hosts in the IPv4 network to verify they are not in use.
Source code in gso/workflows/iptrunk/create_iptrunk.py
ping_all_hosts_v6(new_ipv6_network)
Ping all hosts in the IPv6 network to verify they are not in use.
Source code in gso/workflows/iptrunk/create_iptrunk.py
initialize_subscription(subscription, iptrunk_type, iptrunk_description, iptrunk_speed, iptrunk_minimum_links, side_a_node_id, side_a_ae_iface, side_a_ae_members, side_b_node_id, side_b_ae_iface, side_b_ae_members)
Take all input from the user, and store it in the database.
Source code in gso/workflows/iptrunk/create_iptrunk.py
provision_ip_trunk_iface_dry(subscription, process_id, tt_number)
Perform a dry run of deploying configuration on both sides of the trunk.
Source code in gso/workflows/iptrunk/create_iptrunk.py
provision_ip_trunk_iface_real(subscription, process_id, tt_number)
Deploy IP trunk configuration on both sides.
Source code in gso/workflows/iptrunk/create_iptrunk.py
check_ip_trunk_connectivity(subscription)
Check successful connectivity across the new trunk.
Source code in gso/workflows/iptrunk/create_iptrunk.py
provision_ip_trunk_isis_iface_dry(subscription, process_id, tt_number)
Perform a dry run of deploying ISIS configuration.
Source code in gso/workflows/iptrunk/create_iptrunk.py
provision_ip_trunk_isis_iface_real(subscription, process_id, tt_number)
Deploy ISIS configuration on both sides.
Source code in gso/workflows/iptrunk/create_iptrunk.py
check_ip_trunk_isis(subscription)
Run an Ansible playbook to confirm ISIS adjacency.
Source code in gso/workflows/iptrunk/create_iptrunk.py
register_dns_records(subscription)
Register DNS records for both sides of the newly created IP trunk.
Source code in gso/workflows/iptrunk/create_iptrunk.py
reserve_interfaces_in_netbox(subscription)
Create the LAG interfaces in NetBox and attach the LAG interfaces to the physical interfaces.
Source code in gso/workflows/iptrunk/create_iptrunk.py
netbox_allocate_side_a_interfaces(subscription)
Allocate the LAG interfaces for the Nokia router on side A.
Source code in gso/workflows/iptrunk/create_iptrunk.py
netbox_allocate_side_b_interfaces(subscription)
Allocate the LAG interfaces for the Nokia router on side B.
Source code in gso/workflows/iptrunk/create_iptrunk.py
create_new_sharepoint_checklist(subscription, tt_number, process_id)
Create a new checklist item in SharePoint for approving this IP trunk.
Source code in gso/workflows/iptrunk/create_iptrunk.py
create_iptrunk()
Create a new IP trunk.
- Create the subscription object in the database
- Gather relevant information from Infoblox
- Reserve interfaces in Netbox
- Deploy configuration on the two sides of the trunk, first as a dry run
- Check connectivity on the new trunk
- Deploy the new ISIS metric on the trunk, first as a dry run
- Verify ISIS adjacency
- Allocate the interfaces in Netbox
- Set the subscription to active in the database