cisco.catalystcenter.network_devices_query_v1 module -- Resource module for Network Devices Query V1

Note

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

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

New in cisco.catalystcenter 6.15.0

Synopsis

  • Manage operation create of the resource Network Devices Query V1.

  • Gets the list of Network Devices based on the provided complex filters and aggregation functions. For detailed information about the usage of the API, please refer to the Open API specification document - https //github.com/cisco-en-programmability/catalyst-center-api-specs/blob/main/Assurance/CE_Cat_Center_Org- AssuranceNetworkDevices-2.0.1-resolved.yaml.

Note

This module has a corresponding action plugin.

Requirements

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

  • catalystcentersdk >= 2.3.7.9

  • python >= 3.5

Parameters

Parameter

Comments

_api_port

integer

The Cisco CATALYST Center port.

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

_debug

boolean

Flag for Cisco CATALYST Center SDK to enable debugging.

Choices:

_host

string / required

The Cisco CATALYST Center hostname.

_password

string

The Cisco CATALYST Center password to authenticate.

_username

aliases: user

string

The Cisco CATALYST Center username to authenticate.

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

_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

_version

string

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

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

aggregateAttributes

list / elements=dictionary

Network Devices Query's aggregateAttributes.

function

string

Function.

name

string

Name.

attributes

list / elements=string

Attributes.

endTime

integer

End Time.

filters

list / elements=dictionary

Network Devices Query's filters.

key

string

Key.

operator

string

Operator.

value

string

Value.

page

dictionary

Network Devices Query's page.

count

integer

Count.

limit

integer

Limit.

offset

integer

Offset.

sortBy

string

Sort By.

startTime

integer

Start Time.

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

Views.

Notes

Note

  • SDK Method used are devices.Devices.gets_the_list_of_network_devices_based_on_the_provided_complex_filters_and_aggregation_functions_v1,

  • 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 the embedded connection manager from Cisco CATALYST SDK

  • The parameters starting with catalystCenter_ are used by the Cisco CATALYST Python SDK to establish the connection

See Also

See also

Cisco DNA Center documentation for Devices GetsTheListOfNetworkDevicesBasedOnTheProvidedComplexFiltersAndAggregationFunctionsV1

Complete reference of the GetsTheListOfNetworkDevicesBasedOnTheProvidedComplexFiltersAndAggregationFunctionsV1 API.

Examples

- name: Create
  cisco.catalystcenter.network_devices_query_v1:
    _host: "{{ _host }}"
    _username: "{{ _username }}"
    _password: "{{ _password }}"
    _verify: "{{ _verify }}"
    _api_port: "{{ _api_port }}"
    _version: "{{ _version }}"
    _debug: "{{ _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 DNAC 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", "redundancyMode": "string", "redundancyPeerState": "string", "redundancyPeerStateDerived": "string", "redundancyState": "string", "redundancyStateDerived": "string", "ringStatus": true, "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

  • Rafael Campos (@racampos)