cisco.dnac.topology – Manage Topology objects of Topology

Note

This plugin is part of the cisco.dnac collection (version 2.0.7).

To install it use: ansible-galaxy collection install cisco.dnac.

To use it in a playbook, specify: cisco.dnac.topology.

New in version 1.0.0: of cisco.dnac

Synopsis

  • Returns Layer 2 network Topology by specified VLAN ID.

  • Returns the Layer 3 network Topology by routing protocol.

  • Returns the raw physical Topology by specified criteria of nodeType.

  • Returns site Topology.

  • Returns the list of VLAN names.

Note

This module has a corresponding action plugin.

Requirements

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

  • dnacentersdk

Parameters

Parameter Choices/Defaults Comments
layer2
boolean / required
    Choices:
  • no
  • yes
If true retrieves the layer 2 Topology.
layer3
boolean / required
    Choices:
  • no
  • yes
If true retrieves the layer 3 Topology.
node_type
string
NodeType query parameter.
physical
boolean / required
    Choices:
  • no
  • yes
If true retrieves the physical Topology.
site
boolean / required
    Choices:
  • no
  • yes
If true retrieves the site Topology.
topology_type
string / required
Type of Topology(OSPF,ISIS,etc).
vlan
boolean / required
    Choices:
  • no
  • yes
If true retrieves the vlan Topology.
vlan_id
string / required
Vlan Name for e.g Vlan1, Vlan23 etc.

See Also

See also

cisco.dnac.plugins.module_utils.definitions.topology

The official documentation on the cisco.dnac.plugins.module_utils.definitions.topology module.

Topology reference

Complete reference of the Topology object model.

Topology reference

SDK reference.

Examples

- name: get_topology_details
  cisco.dnac.topology:
    state: query  # required
    vlan_id: SomeValue  # string, required
    layer2: True  # boolean, required
  register: nm_get_topology_details

- name: get_l3_topology_details
  cisco.dnac.topology:
    state: query  # required
    topology_type: SomeValue  # string, required
    layer3: True  # boolean, required
  register: nm_get_l3_topology_details

- name: get_physical_topology
  cisco.dnac.topology:
    state: query  # required
    physical: True  # boolean, required
    node_type: SomeValue  # string
  register: nm_get_physical_topology

- name: get_site_topology
  cisco.dnac.topology:
    state: query  # required
    site: True  # boolean, required
  register: nm_get_site_topology

- name: get_vlan_details
  cisco.dnac.topology:
    state: query  # required
    vlan: True  # boolean, required
  register: nm_get_vlan_details

Return Values

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

Key Returned Description
dnac_response
dictionary
always
A dictionary with the response returned by the DNA Center Python SDK

Sample:
{'response': 29, 'version': '1.0'}
missing_params
list / elements=string
when the function request schema is not satisfied
Provided arguments do not comply with the schema of the DNA Center Python SDK function

sdk_function
string
always
The DNA Center SDK function used to execute the task

Sample:
topology.get_l3_topology_details


Authors

  • Rafael Campos (@racampos)