cisco.dnac.discovery_v1 module – Resource module for Discovery V1
Note
This module is part of the cisco.dnac collection (version 6.31.3).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
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.discovery_v1.
New in cisco.dnac 3.1.0
Synopsis
- Manage operations create, update and delete of the resource Discovery V1. 
- Initiates discovery with the given parameters. 
- Stops all the discoveries and removes them. 
- Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API. 
- Stops or starts an existing discovery. 
Note
This module has a corresponding action plugin.
Requirements
The below requirements are needed on the host that executes this module.
- dnacentersdk >= 2.4.9 
- python >= 3.5 
Parameters
| Parameter | Comments | 
|---|---|
| Deprecated. | |
| CDP level to which neighbor devices to be discovered. | |
| Ids of the devices discovered in a discovery. | |
| To indicate the discovery status. Available options Complete or In Progress. | |
| Status of the discovery. Available options are Active, Inactive, Edit. | |
| Type of the discovery. ‘Single’, ‘Range’, ‘Multi Range’, ‘CDP’, ‘LLDP’, ‘CIDR’. | |
| 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:  | |
| The Cisco DNA Center username to authenticate. Default:  | |
| Flag to enable or disable SSL certificate verification. Choices: 
 | |
| Informs the SDK which version of Cisco DNA Center to use. Default:  | |
| Enable Password of the devices to be discovered. | |
| List of global credential ids to be used. | |
| Discovery’s httpReadCredential. | |
| Comments to identify the credential. | |
| Credential type to identify the application that uses the credential. | |
| Description of the credential. | |
| Credential Id. | |
| Credential Tenant Id. | |
| Credential Id. | |
| HTTP(S) password. | |
| HTTP(S) port. | |
| Flag for HTTPS. Choices: 
 | |
| HTTP(S) username. | |
| Discovery’s httpWriteCredential. | |
| Comments to identify the credential. | |
| Credential type to identify the application that uses the credential. | |
| Description of the credential. | |
| Credential Id. | |
| Credential Tenant Id. | |
| Credential Id. | |
| HTTP(S) password. | |
| HTTP(S) port. | |
| Flag for HTTPS. Choices: 
 | |
| HTTP(S) username. | |
| Unique Discovery Id. | |
| List of IP address of the devices to be discovered. | |
| IP addresses of the devices to be filtered. | |
| Flag to mention if CDP discovery or not. Choices: 
 | |
| LLDP level to which neighbor devices to be discovered. | |
| Name for the discovery. | |
| Netconf port on the device. Netconf will need valid sshv2 credentials for it to work. | |
| Number of devices discovered in the discovery. | |
| Parent Discovery Id from which the discovery was initiated. | |
| Password of the devices to be discovered. | |
| Preferred management IP method. Available options are ‘None’ and ‘UseLoopBack’. | |
| Order of protocol (ssh/telnet) in which device connection will be tried. Ex ‘telnet’ only telnet; ‘ssh,telnet’ ssh with higher order than telnet. | |
| Number of times to try establishing connection to device. | |
| Number of times to try establishing connection to device. | |
| Auth passphrase for SNMP. | |
| SNMP auth protocol. SHA’ or ‘MD5’. | |
| Mode of SNMP. ‘AUTHPRIV’ or ‘AUTHNOPRIV’ or ‘NOAUTHNOPRIV’. | |
| Passphrase for SNMP privacy. | |
| SNMP privacy protocol. ‘AES128’. | |
| SNMP RO community of the devices to be discovered. | |
| Description for SNMP RO community. | |
| SNMP RW community of the devices to be discovered. | |
| Description for SNMP RW community. | |
| SNMP username of the device. | |
| Version of SNMP. V2 or v3. | |
| Time to wait for device response. | |
| Updates Management IP if multiple IPs are available for a device. If set to true, when a device is rediscovered with a different IP, the management IP is updated. Default value is false. Choices: 
 | |
| Username of the devices to be discovered. | |
| Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. Choices: 
 | 
Notes
Note
- SDK Method used are discovery.Discovery.delete_discovery_by_id_v1, discovery.Discovery.start_discovery_v1, discovery.Discovery.updates_discovery_by_id, 
- Paths used are post /dna/intent/api/v1/discovery, delete /dna/intent/api/v1/discovery, delete /dna/intent/api/v1/discovery/{id}, put /dna/intent/api/v1/discovery, 
- Does not support - check_mode
- The 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 Discovery StartDiscoveryV1
- Complete reference of the StartDiscoveryV1 API. 
- Cisco DNA Center documentation for Discovery DeleteAllDiscoveryV1
- Complete reference of the DeleteAllDiscoveryV1 API. 
- Cisco DNA Center documentation for Discovery DeleteDiscoveryByIdV1
- Complete reference of the DeleteDiscoveryByIdV1 API. 
- Cisco DNA Center documentation for Discovery UpdatesAnExistingDiscoveryBySpecifiedIdV1
- Complete reference of the UpdatesAnExistingDiscoveryBySpecifiedIdV1 API. 
Examples
- name: Delete all
  cisco.dnac.discovery_v1:
    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
- name: Update all
  cisco.dnac.discovery_v1:
    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
    attributeInfo: {}
    cdpLevel: 0
    deviceIds: string
    discoveryCondition: string
    discoveryStatus: string
    discoveryType: string
    enablePasswordList: string
    globalCredentialIdList:
      - string
    httpReadCredential:
      comments: string
      credentialType: string
      description: string
      id: string
      instanceTenantId: string
      instanceUuid: string
      password: string
      port: 0
      secure: true
      username: string
    httpWriteCredential:
      comments: string
      credentialType: string
      description: string
      id: string
      instanceTenantId: string
      instanceUuid: string
      password: string
      port: 0
      secure: true
      username: string
    id: string
    ipAddressList: string
    ipFilterList: string
    isAutoCdp: true
    lldpLevel: 0
    name: string
    netconfPort: string
    numDevices: 0
    parentDiscoveryId: string
    passwordList: string
    preferredMgmtIPMethod: string
    protocolOrder: string
    retryCount: 0
    snmpAuthPassphrase: string
    snmpAuthProtocol: string
    snmpMode: string
    snmpPrivPassphrase: string
    snmpPrivProtocol: string
    snmpRoCommunity: string
    snmpRoCommunityDesc: string
    snmpRwCommunity: string
    snmpRwCommunityDesc: string
    snmpUserName: string
    timeOut: 0
    updateMgmtIp: true
    userNameList: string
- name: Create
  cisco.dnac.discovery_v1:
    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
    cdpLevel: 0
    discoveryType: string
    enablePasswordList:
      - string
    globalCredentialIdList:
      - string
    httpReadCredential:
      password: string
      port: 0
      secure: true
      username: string
    httpWriteCredential:
      password: string
      port: 0
      secure: true
      username: string
    ipAddressList: string
    ipFilterList:
      - string
    lldpLevel: 0
    name: string
    netconfPort: string
    passwordList:
      - string
    preferredMgmtIPMethod: string
    protocolOrder: string
    retry: 0
    snmpAuthPassphrase: string
    snmpAuthProtocol: string
    snmpMode: string
    snmpPrivPassphrase: string
    snmpPrivProtocol: string
    snmpRoCommunity: string
    snmpRoCommunityDesc: string
    snmpRwCommunity: string
    snmpRwCommunityDesc: string
    snmpUserName: string
    snmpVersion: string
    timeOut: 0
    userNameList:
      - string
- name: Delete by id
  cisco.dnac.discovery_v1:
    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
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:  | 
