Bulk IP Address Allocation (Netbox) - Workflow Modification
  • 18 Oct 2024
  • Dark
    Light
  • PDF

Bulk IP Address Allocation (Netbox) - Workflow Modification

  • Dark
    Light
  • PDF

Article summary

WF%20Modification


Workflow Modification Video

Step 1

We are now ready to continue building our workflow.  Navigate back to the Lab – Bulk Allocate IP Addresses – NetBox – XX workflow.

Step 2

Delete the transition between the Excel to JSON task and the End task and create space to add 5 additional tasks to the workflow.

Step 3

Add the following tasks to the canvas to the right of the Excel to JSON task.  Transformation, Child Job, Render Jinja Template, Query, and View HTML.

Step 4

Add success transitions to connect each task to the task directly following it.  

Step 5

We are ready to configure our tasks.  Double click the Transformation task to open the configuration window.

Step 6

From the Transformation dropdown, select the Lab – Build Loop Data – NetBox - JST – XX transformation. Once selected, the summary will automatically update.

Step 7

For the hostData variable, select Task as the Variable Source.  For the Previous Task select Convert Excel Data to JSON and for the Task Variable, select response.

 Close the configuration window.

Step 8

Double click the Child Job task to open the configuration window.

Step 9

Update the summary to Allocate IPs in Loop.

Step 10

From the Workflow dropdown, select the Assign Next IP Address in Prefix – NetBox pre-built workflow.

Step 11

Next, we need to toggle the Enable Looping switch.  Looping allows multiple iterations of the same child job to be run either sequentially or in parallel.  If run sequentially, each child job iteration is run after the previous child job iteration is finished.  If run in parallel, all iterations are started at the same time.  For our use-case we would like the loop type to be sequential, so we will select the Sequential radio button.

Step 12

For the Loop Array variable, select Task as the Source.  For the Previous Task select Lab – Build Loop Data – NetBox - JST- XX and for the Task Variable select loopData.

 Close the configuration window.

Step 13

Double click the Render Jinja Template task to open the configuration window.

Step 14

For the name variable, select Static as the Variable Source and enter Bulk Allocate IP Addresses Report for the Value.

Step 15

For the context variable, select Task as the Variable Source.  For the Previous Task select Allocate IPs in Loop and for the Task Variable select job_detail.

 Close the configuration window.

Step 16

Double click the Query task to open the configuration window.

Step 17

Update the summary to Query Rendered Template.

Step 18

For the pass_on_null variable select Static as the Variable Source and False for the Value.

Step 19

For the query variable select Static as the Variable Source and enter renderedTemplate for the Value.

Step 20 

For the object variable select Task as the Variable Source. For the Previous Task select Render Jinja Template and for the Task Variable select renderedTemplate.

 Close the configuration window.

Step 21

Double click the View HTML task to open the configuration window.

Step 22

For the header variable select Static as the Variable Source and enter IP Allocations for the Value.

Step 23

For the body variable select Task as the Variable Source.  Select Query Rendered Template for the Previous Task and return_data for the Task Variable.

Step 24

For the variables variable select Static as the Variable Source and leave the value blank.

Step 25

For the btn_success variable select Static as the Variable Source and enter Ok for the value.

Step 26

For the btn_failure variable select Static as the Variable Variable Source and leave the value blank.

 Close the configuration window.

Step 27

Our workflow is complete.  Click Save.  A green check mark appears in upper right corner signaling that the workflow has passed validation and that all resources needed to run the workflow are present.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.