cisco.catalystcenter.network_devices_query module -- Resource module for Network Devices Query

Note

This module is part of the cisco.catalystcenter collection (version 2.11.0).

To install it, use: ansible-galaxy collection install cisco.catalystcenter. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.catalystcenter.network_devices_query.

New in cisco.catalystcenter 1.0.0

Synopsis

  • Manage operation create of the resource Network Devices Query.

  • Gets the list of Network Devices based on the provided complex filters and.

Note

This module has a corresponding action plugin.

Requirements

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

  • catalystcentersdk >= 3.2.3.0.0

  • python >= 3.12

Parameters

Parameter

Comments

aggregateAttributes

list / elements=dictionary

Network Devices Query's aggregateAttributes.

function

string

Network Devices Query's function.

name

string

Network Devices Query's name.

attributes

list / elements=string

Network Devices Query's attributes.

catalystcenter_debug

aliases: dnac_debug

boolean

Flag for Cisco Catalyst Center SDK to enable debugging.

Choices:

catalystcenter_host

aliases: dnac_host

string / required

The Cisco Catalyst Center hostname.

catalystcenter_password

aliases: dnac_password

string

The Cisco Catalyst Center password to authenticate.

catalystcenter_port

aliases: dnac_port, catalystcenter_api_port

integer

The Cisco Catalyst Center port.

Default: :ansible-option-default:`443`

catalystcenter_username

aliases: dnac_username, user

string

The Cisco Catalyst Center username to authenticate.

Default: :ansible-option-default:`"admin"`

catalystcenter_verify

aliases: dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

catalystcenter_version

aliases: dnac_version

string

Informs the SDK which version of Cisco Catalyst Center to use.

Default: :ansible-option-default:`"3.1.6.0"`

endTime

integer

Network Devices Query's endTime.

filters

list / elements=dictionary

Network Devices Query's filters.

key

string

Network Devices Query's key.

operator

string

Network Devices Query's operator.

value

string

Network Devices Query's value.

page

dictionary

Network Devices Query's page.

count

integer

Network Devices Query's count.

limit

integer

Network Devices Query's limit.

offset

integer

Network Devices Query's offset.

sortBy

string

Network Devices Query's sortBy.

startTime

integer

Network Devices Query's startTime.

validate_response_schema

boolean

Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

views

list / elements=string

Network Devices Query's views.

Notes

Note

  • SDK Method used are devices.Devices.gets_the_list_of_network_devices_based_on_the_provided_complex_filters_and_aggregation_functions,

  • Paths used are post /dna/data/api/v1/networkDevices/query,

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins,

  • but instead uses the embedded connection manager from Cisco CATALYST SDK

  • Requires Python >= 3.10, matching the controller Python versions supported by the collection's minimum ansible-core version (see the collection README for the current ansible-core / Python compatibility range)

See Also

See also

Cisco Catalyst Center documentation for Devices GetsTheListOfNetworkDevicesBasedOnTheProvidedComplexFiltersAndAggregationFunctions

Complete reference of the GetsTheListOfNetworkDevicesBasedOnTheProvidedComplexFiltersAndAggregationFunctions API.

Examples

---
- name: Create
  cisco.catalystcenter.network_devices_query:
    catalystcenter_host: "{{catalystcenter_host}}"
    catalystcenter_username: "{{catalystcenter_username}}"
    catalystcenter_password: "{{catalystcenter_password}}"
    catalystcenter_verify: "{{catalystcenter_verify}}"
    catalystcenter_port: "{{catalystcenter_port}}"
    catalystcenter_version: "{{catalystcenter_version}}"
    catalystcenter_debug: "{{catalystcenter_debug}}"
    aggregateAttributes:
      - function: string
        name: string
    attributes:
      - string
    endTime: 0
    filters:
      - key: string
        operator: string
        value: string
    page:
      count: 0
      limit: 0
      offset: 0
      sortBy: string
    startTime: 0
    views:
      - string

Return Values

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

Key

Description

catalystcenter_response

dictionary

A dictionary or list with the response returned by the Cisco Catalyst Center Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`{"page": {"count": 0, "limit": 0, "offset": 0, "order": "string", "sortBy": "string"}, "response": [{"aggregateAttributes": [{"function": "string", "name": "string", "value": 0}], "apDetails": {"adminState": "string", "apGroup": "string", "apOperationalState": "string", "apType": "string", "connectedTime": 0, "connectedWlcName": "string", "ethernetMac": "string", "flexGroup": "string", "homeApEnabled": true, "icapCapability": "string", "ledFlashEnabled": true, "ledFlashSeconds": 0, "operationalMode": "string", "policyTagName": "string", "powerCalendarProfile": "string", "powerMode": "string", "powerProfile": "string", "powerSaveMode": "string", "powerSaveModeCapable": "string", "powerType": "string", "protocol": "string", "radios": [{"airQuality": 0, "band": "string", "clientCount": 0, "id": "string", "interference": 0, "noise": 0, "trafficUtil": 0, "utilization": 0}], "regulatoryDomain": "string", "resetReason": "string", "rfTagName": "string", "siteTagName": "string", "subMode": "string"}, "clientCount": 0, "collectionStatus": "string", "communicationState": "string", "deviceFamily": "string", "deviceGroupHierarchyId": "string", "deviceRole": "string", "deviceSeries": "string", "deviceType": "string", "fabricDetails": {"fabricRole": ["string"], "fabricSiteId": "string", "fabricSiteName": "string", "l2Vns": ["string"], "l3Vns": ["string"], "networkProtocol": "string", "transitFabrics": ["string"]}, "fabricMetricsDetails": {"aaaStatusScore": 0, "bgpBgpSiteScore": 0, "bgpEvpnScore": 0, "bgpPeerInfraVnScore": 0, "bgpPeerScore": 0, "bgpPubsubSiteScore": 0, "bgpTcpScore": 0, "ctsEnvDataDownloadScore": 0, "fabricSiteScore": 0, "fabricTransitScore": 0, "fabricVnScore": 0, "fabsiteFcpScore": 0, "fabsiteFsconnScore": 0, "fabsiteInfraScore": 0, "internetAvailScore": 0, "lispCpConnScore": 0, "lispTransitConnScore": 0, "mcastScore": 0, "overallFabricScore": 0, "peerScore": 0, "portChannelScore": 0, "pubsubInfraVnScore": 0, "pubsubSessionScore": 0, "pubsubTransitConnScore": 0, "remoteInternetAvailScore": 0, "tcpConnScore": 0, "transitControlPlaneScore": 0, "transitServicesScore": 0, "vnExitScore": 0, "vnFcpScore": 0, "vnServiceScore": 0, "vnStatusScore": 0, "vniStatusScore": 0}, "featureFlagList": ["string"], "haLastResetReason": "string", "haStatus": "string", "id": "string", "ipv4Address": "string", "ipv6Address": "string", "lastBootTime": 0, "macAddress": "string", "maintenanceModeEnabled": true, "managementIpAddress": "string", "metricsDetails": {"airQualityScore": 0, "apCount": 0, "avgTemperature": 0, "cpuScore": 0, "cpuUtilization": 0, "discardInterfaces": ["string"], "discardScore": 0, "errorInterfaces": ["string"], "errorScore": 0, "freeMemoryBuffer": 0, "freeMemoryBufferScore": 0, "freeTimer": 0, "freeTimerScore": 0, "highLinkUtilizationInterfaces": ["string"], "interDeviceConnectedDownInterfaces": ["string"], "interDeviceLinkScore": 0, "interferenceScore": 0, "linkUtilizationScore": 0, "maxTemperature": 0, "memoryScore": 0, "memoryUtilization": 0, "noiseScore": 0, "overallHealthScore": 0, "packetPool": 0, "packetPoolScore": 0, "utilizationScore": 0, "wqePool": 0, "wqePoolScore": 0}, "name": "string", "osType": "string", "physicalPortCount": 0, "platformId": "string", "portCount": 0, "productVendor": "string", "reachabilityHealthStatus": "string", "redundancyMode": "string", "redundancyPeerState": "string", "redundancyPeerStateDerived": "string", "redundancyState": "string", "redundancyStateDerived": "string", "ringStatus": true, "secureMode": "string", "serialNumber": "string", "siteHierarchy": "string", "siteHierarchyId": "string", "siteId": "string", "softwareVersion": "string", "stackType": "string", "switchPoeDetails": {"chassisCount": 0, "freePortCount": 0, "moduleCount": 0, "moduleDetails": [{"chassisId": "string", "interfacePowerMax": 0, "moduleFreePortCount": 0, "moduleId": "string", "modulePoePowerAllocated": 0, "modulePoePowerConsumed": 0, "modulePortCount": 0, "modulePowerBudget": 0, "modulePowerConsumed": 0, "modulePowerRemaining": 0, "moduleSystemPowerAllocated": 0, "moduleSystemPowerConsumed": 0, "moduleUsedPortCount": 0}], "poePowerAllocated": 0, "poePowerConsumed": 0, "poeVersion": "string", "portCount": 0, "powerBudget": 0, "powerConsumed": 0, "powerRemaining": 0, "systemPowerAllocated": 0, "systemPowerConsumed": 0, "usedPortCount": 0}, "tagNames": ["string"], "upTime": 0, "virtualPortCount": 0, "wiredClientCount": 0, "wirelessClientCount": 0}], "version": "string"}`

Authors

  • Bryan Vargas (@bvargasre)