cisco.dnac.network_device – Manage NetworkDevice objects of Devices¶
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.network_device.
New in version 1.0.0: of cisco.dnac
Synopsis¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network-device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters.
Adds the device with given credential.
Sync the devices provided as input.
Deletes the network device for the given Id.
Returns the network device details for the given device ID.
Returns brief summary of device info such as hostname, management IP address for the given device Id.
Returns the list of network devices for the given pagination range.
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
Returns the network device by specified IP address.
Returns the network device with given serial number.
Note
This module has a corresponding action plugin.
Parameters¶
See Also¶
See also
- cisco.dnac.plugins.module_utils.definitions.network_device
 The official documentation on the cisco.dnac.plugins.module_utils.definitions.network_device module.
- NetworkDevice reference
 Complete reference of the NetworkDevice object model.
- NetworkDevice reference
 SDK reference.
Examples¶
- name: get_device_list
  cisco.dnac.network_device:
    state: query  # required
    associated_wlc_ip: SomeValue  # string
    collection_interval: SomeValue  # string
    collection_status: SomeValue  # string
    error_code: SomeValue  # string
    error_description: SomeValue  # string
    family: SomeValue  # string
    hostname: SomeValue  # string
    id: SomeValue  # string
    license_name: SomeValue  # string
    license_status: SomeValue  # string
    license_type: SomeValue  # string
    location: SomeValue  # string
    location_name: SomeValue  # string
    mac_address: SomeValue  # string
    management_ip_address: SomeValue  # string
    module_equpimenttype: SomeValue  # string
    module_name: SomeValue  # string
    module_operationstatecode: SomeValue  # string
    module_partnumber: SomeValue  # string
    module_servicestate: SomeValue  # string
    module_vendorequipmenttype: SomeValue  # string
    not_synced_for_minutes: SomeValue  # string
    platform_id: SomeValue  # string
    reachability_status: SomeValue  # string
    role: SomeValue  # string
    serial_number: SomeValue  # string
    series: SomeValue  # string
    software_type: SomeValue  # string
    software_version: SomeValue  # string
    type: SomeValue  # string
    up_time: SomeValue  # string
  register: nm_get_device_list
- name: add_device
  cisco.dnac.network_device:
    state: create  # required
    cliTransport: SomeValue  # string, required
    enablePassword: SomeValue  # string, required
    ipAddress:  # required
    - SomeValue  # string
    password: SomeValue  # string, required
    snmpAuthPassphrase: SomeValue  # string, required
    snmpAuthProtocol: SomeValue  # string, required
    snmpMode: SomeValue  # string, required
    snmpPrivPassphrase: SomeValue  # string, required
    snmpPrivProtocol: SomeValue  # string, required
    snmpROCommunity: SomeValue  # string, required
    snmpRWCommunity: SomeValue  # string, required
    snmpRetry: 1  #  integer, required
    snmpTimeout: 1  #  integer, required
    snmpUserName: SomeValue  # string, required
    userName: SomeValue  # string, required
    computeDevice: True  # boolean
    extendedDiscoveryInfo: SomeValue  # string
    httpPassword: SomeValue  # string
    httpPort: SomeValue  # string
    httpSecure: True  # boolean
    httpUserName: SomeValue  # string
    merakiOrgId:
    - SomeValue  # string
    netconfPort: SomeValue  # string
    serialNumber: SomeValue  # string
    snmpVersion: SomeValue  # string
    type: # valid values are 'COMPUTE_DEVICE',
      # 'MERAKI_DASHBOARD',
      # 'NETWORK_DEVICE',
      # 'NODATACHANGE'.
      SomeValue  # string
    updateMgmtIPaddressList:
    - existMgmtIpAddress: SomeValue  # string
      newMgmtIpAddress: SomeValue  # string
- name: sync_devices
  cisco.dnac.network_device:
    state: update  # required
    cliTransport: SomeValue  # string, required
    enablePassword: SomeValue  # string, required
    ipAddress:  # required
    - SomeValue  # string
    password: SomeValue  # string, required
    snmpAuthPassphrase: SomeValue  # string, required
    snmpAuthProtocol: SomeValue  # string, required
    snmpMode: SomeValue  # string, required
    snmpPrivPassphrase: SomeValue  # string, required
    snmpPrivProtocol: SomeValue  # string, required
    snmpROCommunity: SomeValue  # string, required
    snmpRWCommunity: SomeValue  # string, required
    snmpRetry: 1  #  integer, required
    snmpTimeout: 1  #  integer, required
    snmpUserName: SomeValue  # string, required
    userName: SomeValue  # string, required
    computeDevice: True  # boolean
    extendedDiscoveryInfo: SomeValue  # string
    httpPassword: SomeValue  # string
    httpPort: SomeValue  # string
    httpSecure: True  # boolean
    httpUserName: SomeValue  # string
    merakiOrgId:
    - SomeValue  # string
    netconfPort: SomeValue  # string
    serialNumber: SomeValue  # string
    snmpVersion: SomeValue  # string
    type: # valid values are 'COMPUTE_DEVICE',
      # 'MERAKI_DASHBOARD',
      # 'NETWORK_DEVICE',
      # 'NODATACHANGE'.
      SomeValue  # string
    updateMgmtIPaddressList:
    - existMgmtIpAddress: SomeValue  # string
      newMgmtIpAddress: SomeValue  # string
- name: delete_device_by_id
  cisco.dnac.network_device:
    state: delete  # required
    id: SomeValue  # string, required
    is_force_delete: True  # boolean
- name: get_device_by_id
  cisco.dnac.network_device:
    state: query  # required
    id: SomeValue  # string, required
  register: nm_get_device_by_id
- name: get_device_summary
  cisco.dnac.network_device:
    state: query  # required
    id: SomeValue  # string, required
    summary: True  # boolean, required
  register: nm_get_device_summary
- name: get_network_device_by_pagination_range
  cisco.dnac.network_device:
    state: query  # required
    records_to_return: 1  #  integer, required
    start_index: 1  #  integer, required
  register: nm_get_network_device_by_pagination_range
- name: get_device_count
  cisco.dnac.network_device:
    state: query  # required
    count: True  # boolean, required
  register: nm_get_device_count
- name: get_network_device_by_ip
  cisco.dnac.network_device:
    state: query  # required
    ip_address: SomeValue  # string, required
  register: nm_get_network_device_by_ip
- name: get_device_by_serial_number
  cisco.dnac.network_device:
    state: query  # required
    serial_number: SomeValue  # string, required
  register: nm_get_device_by_serial_number
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Rafael Campos (@racampos)