cisco.catalystcenter.lan_automation_v2 module -- Resource module for Lan Automation V2

Note

This module is part of the cisco.catalystcenter collection (version 2.11.0).

To install it, use: ansible-galaxy collection install cisco.catalystcenter. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.catalystcenter.lan_automation_v2.

New in cisco.catalystcenter 1.0.0

Synopsis

  • Manage operation create of the resource Lan Automation V2. - > Invoke V2 LAN Automation Start API, which supports optional auto-stop processing feature based on the provided timeout or a specific device list, or both. The stop processing will be executed automatically when either of the cases is satisfied, without specifically calling the stop API. The V2 API behaves similarly to V1 if no timeout or device list is provided, and the user needs to call the stop API for LAN Automation stop processing. With the V2 API, the user can also specify the level up to which the devices can be LAN automated.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • catalystcentersdk >= 3.2.3.0.0

  • python >= 3.12

Parameters

Parameter

Comments

catalystcenter_debug

aliases: dnac_debug

boolean

Flag for Cisco Catalyst Center SDK to enable debugging.

Choices:

catalystcenter_host

aliases: dnac_host

string / required

The Cisco Catalyst Center hostname.

catalystcenter_password

aliases: dnac_password

string

The Cisco Catalyst Center password to authenticate.

catalystcenter_port

aliases: dnac_port, catalystcenter_api_port

integer

The Cisco Catalyst Center port.

Default: :ansible-option-default:`443`

catalystcenter_username

aliases: dnac_username, user

string

The Cisco Catalyst Center username to authenticate.

Default: :ansible-option-default:`"admin"`

catalystcenter_verify

aliases: dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

catalystcenter_version

aliases: dnac_version

string

Informs the SDK which version of Cisco Catalyst Center to use.

Default: :ansible-option-default:`"3.1.6.0"`

payload

list / elements=dictionary

Lan Automation V2's payload.

advertiseLANAutomationRoutesIntoBGP

boolean

Advertise LAN Automation summary route into BGP.

Choices:

areaId

integer

OSPF area Id to be used for underlay devices. Default value if not provided is 0.

authenticationKey

string

Authentication key string to be used in key chain configuration on interface level.

discoveredDeviceSiteNameHierarchy

string

Discovered device site name.

discoveryDevices

list / elements=dictionary

Specific devices that will be LAN Automated in this session. Any other device discovered via DHCP will be attempted for a reset and reload to bring it back to the PnP agent state at the end of the LAN Automation process before process completion. The maximum supported devices that can be provided for a session is 50. If only the discovery devices list is provided and no timeout is provided, then the LAN Automation stop processing will get triggered when all devices from the list are discovered and added to inventory. If both the discovery devices list and timeout are provided, the stop processing will be attempted whichever happens earlier. Users can always use the LAN Automation Stop API to force stop processing.

deviceHostName

string

Hostname of the device.

deviceManagementIPAddress

string

Management IP Address of the device.

deviceSerialNumber

string

Serial number of the device.

deviceSiteNameHierarchy

string

Site name hierarchy for the device, must be a child site of the discoveredDeviceSiteNameHierarchy or same if it's not area type.

discoveryLevel

integer

Level below primary seed device upto which the new devices will be LAN Automated by this session, level + seed = tier. Supported range for level is 1-5, default level is 2.

discoveryTimeout

integer

Discovery timeout in minutes. Until this time, the stop processing will not be triggered. Any device contacting after the provided discovery timeout will not be processed, and a device reset and reload will be attempted to bring it back to the PnP agent state before process completion. The supported timeout range is in minutes 20-10080. If both timeout and discovery devices list are provided, the stop processing will be attempted whichever happens earlier. Users can always use the LAN Automation delete API to force stop processing.

hostNameFileId

string

Use /dna/intent/api/v1/file/namespace/nw_orch API to get the file ID for the already uploaded file in the nw_orch namespace.

hostNamePrefix

string

Host name prefix assigned to the discovered device.

ipPools

list / elements=dictionary

The list of IP pools with their names and roles.

ipPoolName

string

Name of the IP pool.

ipPoolRole

string

Role of the IP pool. Supported roles are MAIN_POOL and PHYSICAL_LINK_POOL.

ipV6Only

boolean

Flag to enable ipv6 for lan automation.

Choices:

isisDomainPwd

string

IS-IS domain password in plain text.

multicastEnabled

boolean

peerDeviceManagmentIPAddress

string

Peer seed management IP address.

primaryDeviceInterfaceNames

list / elements=string

The list of interfaces on primary seed via which the discovered devices are connected.

primaryDeviceManagmentIPAddress

string

Primary seed management IP address.

processId

integer

OSPF process Id to be used for underlay devices. Default value if not provided is 1.

redistributeIsisToBgp

boolean

Advertise LAN Automation summary route into BGP.

Choices:

routingProtocol

dictionary

Underlay routing protocol to be used OSPF or ISIS. ISIS being default if not provided.

useP2PLinkLocalAddress

boolean

Flag to enable local link ip enablement for ipv6, can be true only when ipv6 flag is set to true.

Choices:

validate_response_schema

boolean

Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

Notes

Note

  • SDK Method used are lan_automation.LanAutomation.lan_automation_start,

  • Paths used are post /dna/intent/api/v2/lan-automation,

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins,

  • but instead uses the embedded connection manager from Cisco CATALYST SDK

  • Requires Python >= 3.10, matching the controller Python versions supported by the collection's minimum ansible-core version (see the collection README for the current ansible-core / Python compatibility range)

See Also

See also

Cisco Catalyst Center documentation for LAN Automation LANAutomationStart

Complete reference of the LANAutomationStart API.

Examples

---
- name: Create
  cisco.catalystcenter.lan_automation_v2:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_port: "{{catalystcenter_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    payload:
      - advertiseLANAutomationRoutesIntoBGP: true
        areaId: 0
        authenticationKey: string
        discoveredDeviceSiteNameHierarchy: string
        discoveryDevices:
          - deviceHostName: string
            deviceManagementIPAddress: string
            deviceSerialNumber: string
            deviceSiteNameHierarchy: string
        discoveryLevel: 0
        discoveryTimeout: 0
        hostNameFileId: string
        hostNamePrefix: string
        ipPools:
          - ipPoolName: string
            ipPoolRole: string
        ipV6Only: true
        isisDomainPwd: string
        multicastEnabled: true
        peerDeviceManagmentIPAddress: string
        primaryDeviceInterfaceNames:
          - string
        primaryDeviceManagmentIPAddress: string
        processId: 0
        redistributeIsisToBgp: true
        routingProtocol: {}
        useP2PLinkLocalAddress: true

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

catalystcenter_response

dictionary

A dictionary or list with the response returned by the Cisco Catalyst Center Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}`

Authors

  • Bryan Vargas (@bvargasre)