cisco.dnac.discovery_network_device – Manage DiscoveryNetworkDevice objects of Discovery

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.discovery_network_device.

New in version 1.0.0: of cisco.dnac

Synopsis

  • Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.

  • Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.

  • Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.

  • Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.

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
cli_status
string
CliStatus query parameter.
count
boolean / required
    Choices:
  • no
  • yes
If true gets the number of objects.
http_status
string
HttpStatus query parameter.
id
string / required
Discovery ID.
ip_address
string
IpAddress query parameter.
netconf_status
string
NetconfStatus query parameter.
ping_status
string
PingStatus query parameter.
records_to_return
integer / required
Number of records to return.
snmp_status
string
SnmpStatus query parameter.
sort_by
string
SortBy query parameter.
sort_order
string
SortOrder query parameter.
start_index
integer / required
Start index.
summary
boolean / required
    Choices:
  • no
  • yes
If true gets the summary.
task_id
string
TaskId query parameter.

See Also

See also

cisco.dnac.plugins.module_utils.definitions.discovery_network_device

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

DiscoveryNetworkDevice reference

Complete reference of the DiscoveryNetworkDevice object model.

DiscoveryNetworkDevice reference

SDK reference.

Examples

- name: get_discovered_network_devices_by_discovery_id
  cisco.dnac.discovery_network_device:
    state: query  # required
    id: SomeValue  # string, required
    task_id: SomeValue  # string
  register: nm_get_discovered_network_devices_by_discovery_id

- name: get_discovered_devices_by_range
  cisco.dnac.discovery_network_device:
    state: query  # required
    id: SomeValue  # string, required
    records_to_return: 1  #  integer, required
    start_index: 1  #  integer, required
    task_id: SomeValue  # string
  register: nm_get_discovered_devices_by_range

- name: get_devices_discovered_by_id
  cisco.dnac.discovery_network_device:
    state: query  # required
    id: SomeValue  # string, required
    count: True  # boolean, required
    task_id: SomeValue  # string
  register: nm_get_devices_discovered_by_id

- name: get_network_devices_from_discovery
  cisco.dnac.discovery_network_device:
    state: query  # required
    id: SomeValue  # string, required
    summary: True  # boolean, required
    cli_status: SomeValue  # string
    http_status: SomeValue  # string
    ip_address: SomeValue  # string
    netconf_status: SomeValue  # string
    ping_status: SomeValue  # string
    snmp_status: SomeValue  # string
    sort_by: SomeValue  # string
    sort_order: SomeValue  # string
    task_id: SomeValue  # string
  register: nm_get_network_devices_from_discovery

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:
discovery.get_devices_discovered_by_id


Authors

  • Rafael Campos (@racampos)