Itential vendor logo

Vendor

Itential

Product

Automation Platform

OS Versions:

^3.227.0+2023.1.46

Category

Data Center

Campus

Project Type

Workflow Project


View Repository
Workflow

IAP - Configuration Management Modular Automations

Overview

The integration of Itential and IAG enables network teams to build automations that can include common tasks for configuration management tasks. This is a library of related automations that can be used as modular components in your own larger, end-to-end workflows.

Workflows

NameOverview
Command Template DiffCompare the output between command template pre and post checks
Backup ConfigurationBackup a device configuration
Golden Configuration TreeExecute compliance for a tree
Command Template ExecutionExecute a Command Template against a device list in parallel or in serial
Command Template RunnerRun a command template against a device list
Push Configuration to Device - IAGPush configuration to a device

For further technical details on how to install and use this Workflow Project, please click the Technical Documentation tab.

Table of Contents

Getting Started

This section is helpful for deployments as it provides you with pertinent information on prerequisites and properties.

Helpful Background Information

Workflows often include logic that varies from business to business. As a result, we often find that our Workflow Projects are more useful as modular components that can be incorporated into a larger process. In addition, they often can add value as a learning tool on how we integrate with other systems and how we do things within the Itential Automation Platform.

While these can be utilized, you may find more value in using them as a starting point to build around.

Prerequisites

Itential Workflow Projects are built and tested on particular versions of IAP. In addition, Workflow Projects are often dependent on external systems and as such, these Workflow Projects will have dependencies on these other systems. This version of IAP - Configuration Management has been tested with:

  • IAP 2023.2

External Dependencies

NameOS VersionAPI Version
Itential Automation Gateway (IAG)^3.227.0+2023.1.46

Adapters

NameVersionConfiguration Notes
adapter-automation_gateway^4.29.0-2023.1.14

How to Install

To install the Workflow Project:

  • Verify you are running a supported version of the Itential Automation Platform (IAP) as listed above in the Supported IAP Versions section in order to install the Example Project.
  • Import the Example Project in Admin Essentials.

Testing

Cypress is generally used to test all Itential Example Projects. While Cypress is an opensource tool, at Itential we have internal libraries that have been built around Cypress to allow us to test with a deployed IAP.

When certifying our Example Projects for a release of IAP we run these tests against the particular version of IAP and create a release branch in GitLab. If you do not see the Example Project available in your version of IAP please contact Itential.

While Itential tests this Example Project and its capabilities, it is often the case the customer environments offer their own unique circumstances. Therefore, it is our recommendation that you deploy this Example Project into a development/testing environment in which you can test the Example Project.

Using this Workflow Project

Workflow Projects contain 1 or more workflows. Each of these workflows have different inputs and outputs.

Backup Configuration

Backup a device configuration

Capabilities include:

  • The workflow is used to backup a device configuration

Entry Point IAP Component

The primary IAP component to run Backup Configuration is listed below:

IAP Component NameIAP Component Type
Backup ConfigurationWorkflow

Inputs

The following table lists the inputs for Backup Configuration:

NameTypeRequiredDescriptionExample Value
viewBackupbooleanyesWhether or not to view the backup
true
deviceListstringyesList of the devices to create backup
IOS, Arista
descriptionstringnoDescription of backup
backup device
notesstringnoNotes about backup
backup device
suppressFailureMessagebooleanyesWhether or not to suppress all manual tasks on failure event occurring
false

Outputs

There are no outputs for Backup Configuration.

Query Output

There are no query output examples for Backup Configuration.

Example Inputs and Outputs

Example 1

Input:

{
  "viewBackup": true,
  "deviceList": "IOS, Arista",
  "description": "backup device",
  "notes": "backup device",
  "suppressFailureMessage": false
} 

Output:

{} 

API Links

No API Links provided.


Command Template Diff

Compare the output between command template pre and post checks

Capabilities include:

  • The workflow is used to compare the output between command template pre and post checks

Entry Point IAP Component

The primary IAP component to run Command Template Diff is listed below:

IAP Component NameIAP Component Type
Command Template DiffWorkflow

Inputs

The following table lists the inputs for Command Template Diff:

NameTypeRequiredDescriptionExample Value
preobjectyesOutput of command template prechecks
{
  "commands_results": [
    {
      "evaluated": "show clock",
      "device": "Arista",
      "response": "Mon Nov 14 20:34:46 2023"
    },
    {
      "evaluated": "show ver",
      "device": "Arista",
      "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.25.2F\nArchitecture: x86_64\nInternal build version: 4.25.2F-23563874.4252F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 8 hours and 59 minutes\nTotal memory: 2004192 kB\nFree memory: 890760 kB"
    }
  ]
}
postobjectyesOutput of command template postchecks
{
  "commands_results": [
    {
      "evaluated": "show ver",
      "device": "Arista",
      "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 8 hours and 59 minutes\nTotal memory: 2004192 kB\nFree memory: 890760 kB"
    },
    {
      "evaluated": "show clock",
      "device": "Arista",
      "response": "Tue Nov 14 20:34:46 2023"
    },
    {
      "evaluated": "show history",
      "device": "Arista",
      "response": "enable\n  terminal length 0\n  terminal width 512"
    }
  ]
}

Outputs

The following table lists the outputs for Command Template Diff:

NameTypeDescriptionExample Value
diffstringCommand Template Diff Result
Common

Command: show clock Device: Arista Response : - Mon Nov 14 20:34:46 2023 + Tue Nov 14 20:34:46 2023

Command: show ver Device: Arista Response : Arista vEOS-lab Hardware version: Serial number: 1F50C53E569A8973B814F8F150578977 Hardware MAC address: 0050.5673.63b2 System MAC address: 0050.5673.63b2

- Software image version: 4.25.2F + Software image version: 4.26.2F Architecture: x86_64 - Internal build version: 4.25.2F-23563874.4252F + Internal build version: 4.26.2F-23563874.4262F Internal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457 Image format version: 1.0

Uptime: 2 weeks, 0 days, 8 hours and 59 minutes Total memory: 2004192 kB Free memory: 890760 kB

Pre-Check Only

Post-Check Only Command: show history Device: Arista Response: enable terminal length 0 terminal width 512

Query Output

The following items show how to query successful results from the output of Command Template Diff:

Command Template Diff Result

diff

Example Inputs and Outputs

Example 1

Input:

{
  "pre": {
    "commands_results": [
      {
        "evaluated": "show clock",
        "device": "Arista",
        "response": "Mon Nov 14 20:34:46 2023"
      },
      {
        "evaluated": "show ver",
        "device": "Arista",
        "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.25.2F\nArchitecture: x86_64\nInternal build version: 4.25.2F-23563874.4252F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 8 hours and 59 minutes\nTotal memory: 2004192 kB\nFree memory: 890760 kB"
      }
    ]
  },
  "post": {
    "commands_results": [
      {
        "evaluated": "show ver",
        "device": "Arista",
        "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 8 hours and 59 minutes\nTotal memory: 2004192 kB\nFree memory: 890760 kB"
      },
      {
        "evaluated": "show clock",
        "device": "Arista",
        "response": "Tue Nov 14 20:34:46 2023"
      },
      {
        "evaluated": "show history",
        "device": "Arista",
        "response": "enable\n  terminal length 0\n  terminal width 512"
      }
    ]
  }
} 

Output:

{
  "diff": "Common\n\nCommand: show clock \nDevice: Arista \nResponse : \n- Mon Nov 14 20:34:46 2023\n+ Tue Nov 14 20:34:46 2023\n\nCommand: show ver \nDevice: Arista \nResponse : \nArista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\n- Software image version: 4.25.2F\n+ Software image version: 4.26.2F\nArchitecture: x86_64\n- Internal build version: 4.25.2F-23563874.4252F\n+ Internal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 8 hours and 59 minutes\nTotal memory: 2004192 kB\nFree memory: 890760 kB\n \n \nPre-Check Only \n \nPost-Check Only\nCommand: show history\nDevice: Arista\nResponse: enable\n  terminal length 0\n  terminal width 512\n\n "
} 

API Links

No API Links provided.


Command Template Execution

Execute a Command Template against a device list in parallel or in serial

Capabilities include:

  • The workflow is used to execute a command template against a device list in parallel or in serial

Entry Point IAP Component

The primary IAP component to run Command Template Execution is listed below:

IAP Component NameIAP Component Type
Command Template ExecutionWorkflow

Inputs

The following table lists the inputs for Command Template Execution:

NameTypeRequiredDescriptionExample Value
deviceListstringyesList of the devices
Arista, EOS
executionstringyesWhether to run the command template against the device list in parallel or in serial
Serial
templateNamestringyesName of the command template
EOS - Show Version
templateVariablesobjectyesTemplate variables to run the command template
{
  "version": "4.26.2F",
  "image": "vEOS64-lab-4.26.2F.swi",
  "flashMemory": "flash:"
}
reattemptbooleanyesWhether or not to reattempt if failure occurs
false
reattemptWaitTimenumbernoThe amount of minutes that the task to run command template should wait before re-attempting
0
reattemptQuantitynumbernoThe amount of times that the task to run command template should execute
0
suppressFailureMessagebooleanyesWhether or not to suppress all manual tasks on failure event occurring
false
suppressSuccessMessagebooleanyesWhether or not to suppress all manual tasks on success event occurring
true

Outputs

There are no outputs for Command Template Execution.

Query Output

There are no query output examples for Command Template Execution.

Example Inputs and Outputs

Example 1

Input:

{
  "deviceList": "Arista, EOS",
  "execution": "Serial",
  "templateName": "EOS - Show Version",
  "templateVariables": {},
  "reattempt": false,
  "reattemptWaitTime": 0,
  "reattemptQuantity": 0,
  "suppressFailureMessage": false,
  "suppressSuccessMessage": true
} 

Output:

{} 

API Links

No API Links provided.


Command Template Runner

Run a command template against a device list

Capabilities include:

  • The workflow is used to run a command template against a device list

Entry Point IAP Component

The primary IAP component to run Command Template Runner is listed below:

IAP Component NameIAP Component Type
Command Template RunnerWorkflow

Inputs

The following table lists the inputs for Command Template Runner:

NameTypeRequiredDescriptionExample Value
devicesarrayyesList of the devices
[
  "Arista",
  "EOS"
]
templateNamestringyesName of the command template
EOS - Show Version
templateVariablesobjectyesTemplate variables to run the command template
{
  "version": "4.26.2F",
  "image": "vEOS64-lab-4.26.2F.swi",
  "flashMemory": "flash:"
}
reattemptbooleanyesWhether or not to reattempt if failure occurs
false
reattemptWaitTimenumbernoThe amount of minutes that the task to run command template should wait before re-attempting
0
reattemptQuantitynumbernoThe amount of times that the task to run command template should execute
0
suppressFailureMessagebooleanyesWhether or not to suppress all manual tasks on failure event occurring
false
suppressSuccessMessagebooleanyesWhether or not to suppress all manual tasks on success event occurring
true

Outputs

The following table lists the outputs for Command Template Runner:

NameTypeDescriptionExample Value
templateResultsobjectCommand Template Runner Result
{
  "all_pass_flag": true,
  "result": true,
  "commands_results": [
    {
      "raw": "show version",
      "all_pass_flag": true,
      "evaluated": "show version",
      "parameters": {},
      "rules": [
        {
          "rule": "Uptime",
          "eval": "contains",
          "severity": "error",
          "raw": "Uptime",
          "result": true
        }
      ],
      "device": "Arista",
      "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 3 hours and 25 minutes\nTotal memory: 2004192 kB\nFree memory: 881572 kB",
      "result": true
    },
    {
      "raw": "show version",
      "all_pass_flag": true,
      "evaluated": "show version",
      "parameters": {},
      "rules": [
        {
          "rule": "Uptime",
          "eval": "contains",
          "severity": "error",
          "raw": "Uptime",
          "result": true
        }
      ],
      "device": "EOS",
      "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 3 hours and 25 minutes\nTotal memory: 2004192 kB\nFree memory: 881572 kB",
      "result": true
    }
  ],
  "name": "EOS - Show Version"
}

Query Output

The following items show how to query successful results from the output of Command Template Runner:

Command Template Runner Result

templateResults

Example Inputs and Outputs

Example 1

Input:

{
  "suppressSuccessMessage": true,
  "templateName": "EOS - Show Version",
  "templateVariables": {},
  "devices": [
    "Arista",
    "EOS"
  ],
  "reattempt": false,
  "reattemptWaitTime": 0,
  "reattemptQuantity": 0,
  "suppressFailureMessage": false
} 

Output:

{
  "templateResults": {
    "all_pass_flag": true,
    "result": true,
    "commands_results": [
      {
        "raw": "show version",
        "all_pass_flag": true,
        "evaluated": "show version",
        "parameters": {},
        "rules": [
          {
            "rule": "Uptime",
            "eval": "contains",
            "severity": "error",
            "raw": "Uptime",
            "result": true
          }
        ],
        "device": "Arista",
        "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 3 hours and 25 minutes\nTotal memory: 2004192 kB\nFree memory: 881572 kB",
        "result": true
      },
      {
        "raw": "show version",
        "all_pass_flag": true,
        "evaluated": "show version",
        "parameters": {},
        "rules": [
          {
            "rule": "Uptime",
            "eval": "contains",
            "severity": "error",
            "raw": "Uptime",
            "result": true
          }
        ],
        "device": "EOS",
        "response": "Arista vEOS-lab\nHardware version: \nSerial number: 1F50C53E569A8973B814F8F150578977\nHardware MAC address: 0050.5673.63b2\nSystem MAC address: 0050.5673.63b2\n\nSoftware image version: 4.26.2F\nArchitecture: x86_64\nInternal build version: 4.26.2F-23563874.4262F\nInternal build ID: aefeb671-4f24-4b4d-995f-bcbc507ec457\nImage format version: 1.0\n\nUptime: 2 weeks, 0 days, 3 hours and 25 minutes\nTotal memory: 2004192 kB\nFree memory: 881572 kB",
        "result": true
      }
    ],
    "name": "EOS - Show Version"
  }
}
 

API Links

No API Links provided.


Golden Configuration Tree

Execute compliance for a tree

Capabilities include:

  • The workflow is used to execute compliance for a tree

Entry Point IAP Component

The primary IAP component to run Golden Configuration Tree is listed below:

IAP Component NameIAP Component Type
Golden Configuration TreeWorkflow

Inputs

The following table lists the inputs for Golden Configuration Tree:

NameTypeRequiredDescriptionExample Value
treeNamestringyesName of the configuration tree
IAG Devices Compliance
suppressFailureMessagebooleanyesWhether or not to suppress all manual tasks on failure event occurring
false

Outputs

There are no outputs for Golden Configuration Tree.

Query Output

There are no query output examples for Golden Configuration Tree.

Example Inputs and Outputs

Example 1

Input:

{
  "suppressFailureMessage": true,
  "treeName": "IAG Devices Compliance"
} 

Output:

{} 

API Links

No API Links provided.


Push Configuration to Device - IAG

Push configuration to a device

Capabilities include:

  • The workflow is used to push configuration to a device

Entry Point IAP Component

The primary IAP component to run Push Configuration to Device - IAG is listed below:

IAP Component NameIAP Component Type
Push Configuration to Device - IAGWorkflow

Inputs

The following table lists the inputs for Push Configuration to Device - IAG:

NameTypeRequiredDescriptionExample Value
devicestringyesDevice name
Arista
templateNamestringyesName of the Jinja template
EOS - Port Turn Up
templateVariablesobjectyesTemplate variables to run the Jinja template
{
  "type": "Vlan",
  "id": "17",
  "description": "testing",
  "ipAddress": "40.30.20.10",
  "cidr": "30"
}
suppressFailureMessagebooleanyesWhether or not to suppress all manual tasks on failure event occurring
true
suppressSuccessMessagebooleanyesWhether or not to suppress all manual tasks on success event occurring
true

Outputs

The following table lists the outputs for Push Configuration to Device - IAG:

NameTypeDescriptionExample Value
pushConfigurationResultstringResult of pushing configuration to device
SUCCESS
configurationToPushstringRendered configuration to push to device
conf t
interface Vlan 17
description testing
ip address 40.30.20.10/30
no shutdown
exit

Query Output

The following items show how to query successful results from the output of Push Configuration to Device - IAG:

Push Configuration to Device Result

pushConfigurationResult

The following items show how to query failure results from the output of Push Configuration to Device - IAG:

Push Configuration to Device Failure

pushConfigurationResult

Example Inputs and Outputs

Example 1

Input:

{
  "suppressFailureMessage": true,
  "templateName": "EOS - Port Turn Up",
  "templateVariables": {
    "type": "Vlan",
    "id": "17",
    "description": "testing",
    "ipAddress": "40.30.20.10",
    "cidr": "30"
  },
  "suppressSuccessMessage": true,
  "device": "Arista"
} 

Output:

{
  "pushConfigurationResult": "SUCCESS",
  "configurationToPush": "conf t\ninterface Vlan 17\ndescription testing\nip address 40.30.20.10/30\nno shutdown\nexit"
} 
Example 2

Input:

{
  "suppressFailureMessage": true,
  "templateName": "EOS - Port Turn Up",
  "templateVariables": {
    "type": "Vlan",
    "id": "17",
    "description": "testing",
    "ipAddress": "40.30.20.10",
    "cidr": "30"
  },
  "suppressSuccessMessage": true,
  "device": "Arista"
} 

Output:

{
  "pushConfigurationResult": "FAILED",
  "configurationToPush": "conf t\ninterface Vlan 17\ndescription testing\nip address 40.30.20.10/30\nno shutdown\nexit"
} 

API Links

No API Links provided.


Additional Information

Support

Please use your Itential Customer Success account if you need support when using this Workflow Project.