cisco.dnac.discoverys module -- Resource module for Discoverys
Note
This module is part of the cisco.dnac collection (version 6.46.0).
To install it, use: ansible-galaxy collection install cisco.dnac.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.dnac.discoverys.
New in cisco.dnac 6.46.0
Synopsis
Manage operations create, update and delete of the resource Discoverys. - > This API creates a discovery. The response includes a task url that provides access to the task's details. By accessing this URL, users will receive a response containing a resultLocation attribute, which provides details of the discovery settings that was created, including the discovery id.
API to delete discovery by the given discovery id. - > API to edit the discovery details of the given discovery id. Updating the discovery details while the discovery is in progress is not allowed.
Note
This module has a corresponding action plugin.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk >= 2.11.0
python >= 3.12
Parameters
Parameter |
Comments |
|---|---|
Discoverys's credentials. |
|
Discoverys's cli. |
|
Description for CLI credential. |
|
List of global credential ids. |
|
Connection protocol for the device. Default value is SSH. |
|
CLI username to login to the device. |
|
Discoverys's httpRead. |
|
Description for HTTP(S) read credentials. |
|
List of global credential ids. |
|
Number of the TCP/UDP port that is used for HTTPS traffic. The default is port number 443 (the well-known port for HTTPS). |
|
Protocol for HTTP credentials. |
|
Name that is used to authenticate the HTTPS connection. Username cannot contain spaces or angle brackets (< >). |
|
Discoverys's httpWrite. |
|
Description for HTTP(S) write credentials. |
|
List of global credential ids. |
|
Number of the TCP/UDP port that is used for HTTPS traffic. The default is port number 443 (the well-known port for HTTPS). |
|
Protocol for HTTP credentials. |
|
Name that is used to authenticate the HTTPS connection. Username cannot contain spaces or angle brackets (< >). |
|
Discoverys's netconf. |
|
Description for NETCONF credential. |
|
List of global credential ids. |
|
Netconf Port of the device. Recommended port number is 830. |
|
Discoverys's snmp. |
|
The number of times to repeat the failed SNMP polling request after a timeout. Max value supported is 3. Default is Global SNMP retry (if exists) or 3. |
|
Discoverys's snmpV2Read. |
|
Description for SNMP read-only community. |
|
List of global credential ids. |
|
Discoverys's snmpV2Write. |
|
Description for SNMP read-write community. |
|
List of global credential ids. |
|
Discoverys's snmpV3. |
|
SNMP authentication type. Required if the SNMP security mode is AUTHPRIV or AUTHNOPRIV. |
|
Description for SNMP V3 credential. |
|
List of global credential ids. |
|
Security level that an SNMP message requires. |
|
SNMP privacy type. Required if the SNMP mode is AUTHPRIV. |
|
Username associated with the SNMPv3 settings. The username can only contain letters, numbers and -_.@ characters. |
|
The interval (in seconds) after which SNMP failure to respond to the polling request generates a timeout. Max value supported is 300. Default is Global SNMP timeout (if exists) or 5. |
|
Discoverys's discoveryTypeDetails. |
|
Discoverys's cidrAddress. |
|
CIDR prefix for the IP address. |
|
The CIDR suffix length indicates the number of bits for host addresses, following the prefix. For IPv4, supported lengths range from 20 to 30, where default is 30. For IPv6, they range from 116 to 126, where default is 126. |
|
This field defines the CDP level, indicating the number of hops from the seed device to scan. Acceptable values range from 1 to 16, with a default of 16. For instance, a CDP level of 3 means scanning will include up to three hops from the seed device. |
|
IPv4 or IPv6 address of the device. |
|
Discoverys's range. |
|
End IP address of devices to be discovered. |
|
Start IP address of the devices to be discovered. |
|
Discoverys's subnetFilter. |
|
Discoverys's cidrAddress. |
|
CIDR prefix for the IP address. |
|
The CIDR suffix length indicates the number of bits for host addresses, following the prefix. For IPv4, supported lengths range from 20 to 30, where default is 30. For IPv6, they range from 116 to 126, where default is 126. |
|
IPv4 or IPv6 address of the device. |
|
Type of the discovery. |
|
Flag for Cisco DNA Center SDK to enable debugging. Choices: |
|
The Cisco DNA Center hostname. |
|
The Cisco DNA Center password to authenticate. |
|
The Cisco DNA Center port. Default: :ansible-option-default:`443` |
|
The Cisco DNA Center username to authenticate. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Informs the SDK which version of Cisco DNA Center to use. Default: :ansible-option-default:`"3.1.6.0"` |
|
Id path parameter. The id of the discovery. |
|
When Catalyst Center discovers a device, it uses one of the device's IP addresses as the preferred management IP address for the device. The IP address can be that of a built-in management interface of the device, another physical interface, or a logical interface like Loopback0. You can configure Catalyst Center to log the device's loopback IP address as the preferred management IP address, provided the IP address is reachable from Catalyst Center. |
|
The name of the discovery job being created. This will be a unique name. |
|
This flag indicates to discover only new devices that are not in inventory. If set to true, only devices that are not in the inventory will be discovered. If set to false, devices that already exist in the inventory will not be listed in the discovered devices list. Choices: |
|
This flag indicates if the management IP address of existing devices to be updated as part of this discovery. If set false devices get discovered with the existing management IP address. If set true it overwrites the management IP address with the new IP address used in discovery. Choices: |
|
Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
SDK Method used are devices.Devices.creates_discovery, devices.Devices.deletes_discovery_by_id, devices.Devices.edits_discovery,
Paths used are post /dna/intent/api/v1/discoverys, delete /dna/intent/api/v1/discoverys/{id}, put /dna/intent/api/v1/discoverys/{id},
Does not support
check_modeThe plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK
The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection
See Also
See also
- Cisco DNA Center documentation for Devices CreatesDiscovery
Complete reference of the CreatesDiscovery API.
- Cisco DNA Center documentation for Devices DeletesDiscoveryById
Complete reference of the DeletesDiscoveryById API.
- Cisco DNA Center documentation for Devices EditsDiscovery
Complete reference of the EditsDiscovery API.
Examples
---
- name: Create
cisco.dnac.discoverys:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
credentials:
cli:
description: string
globalCredentialIdList:
- string
protocolOrder: string
username: string
httpRead:
description: string
globalCredentialIdList:
- string
port: 0
protocol: string
username: string
httpWrite:
description: string
globalCredentialIdList:
- string
port: 0
protocol: string
username: string
netconf:
description: string
globalCredentialIdList:
- string
port: 0
snmp:
retries: 0
snmpV2Read:
description: string
globalCredentialIdList:
- string
snmpV2Write:
description: string
globalCredentialIdList:
- string
snmpV3:
authType: string
description: string
globalCredentialIdList:
- string
mode: string
privacyType: string
username: string
timeout: 0
discoveryTypeDetails:
cidrAddress:
cidrPrefix: string
cidrSuffix: 0
hopCount: 0
ipAddress: string
range:
- ipAddressEnd: string
ipAddressStart: string
subnetFilter:
cidrAddress:
cidrPrefix: string
cidrSuffix: 0
ipAddress: string
type: string
managementIpSelectionMethod: string
name: string
onlyNewDevice: true
updateManagementIp: true
- name: Delete by id
cisco.dnac.discoverys:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: absent
id: string
- name: Update by id
cisco.dnac.discoverys:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
credentials:
cli:
description: string
globalCredentialIdList:
- string
protocolOrder: string
username: string
httpRead:
description: string
globalCredentialIdList:
- string
port: 0
protocol: string
username: string
httpWrite:
description: string
globalCredentialIdList:
- string
port: 0
protocol: string
username: string
netconf:
description: string
globalCredentialIdList:
- string
port: 0
snmp:
retries: 0
snmpV2Read:
description: string
globalCredentialIdList:
- string
snmpV2Write:
description: string
globalCredentialIdList:
- string
snmpV3:
authType: string
description: string
globalCredentialIdList:
- string
mode: string
privacyType: string
username: string
timeout: 0
discoveryTypeDetails:
cidrAddress:
cidrPrefix: string
cidrSuffix: 0
hopCount: 0
ipAddress: string
range:
- ipAddressEnd: string
ipAddressStart: string
subnetFilter:
cidrAddress:
cidrPrefix: string
cidrSuffix: 0
ipAddress: string
type: string
id: string
managementIpSelectionMethod: string
onlyNewDevice: true
updateManagementIp: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A dictionary or list with the response returned by the Cisco DNAC Python SDK Returned: always Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}` |