cisco.catalystcenter.pnp_network_devices_count_info module -- Information module for Pnp Network Devices Count
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.pnp_network_devices_count_info.
New in cisco.catalystcenter 2.11.0
Synopsis
Get all Pnp Network Devices Count.
Retrieves a count of Plug and Play PNP devices based on specified parameters.
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 |
|---|---|
Flag for Cisco Catalyst Center SDK to enable debugging. Choices: |
|
The Cisco Catalyst Center hostname. |
|
The Cisco Catalyst Center password to authenticate. |
|
The Cisco Catalyst Center port. Default: :ansible-option-default:`443` |
|
The Cisco Catalyst 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 Catalyst Center to use. Default: :ansible-option-default:`"3.1.6.0"` |
|
ContactedStatus query parameter. Indicates whether a device has contacted PnP. |
|
Additional headers. |
|
Hostname query parameter. The hostname of the device. |
|
ImageVersion query parameter. The image version of the device. |
|
MacAddress query parameter. The MAC address of the device. |
|
OnboardingState query parameter. The state of the workflow being executed on the device. Possible values are | Onboarding State | Description |-----------------------------------|--------------------------------------------------------| | `NOT_CONTACTED` | Device has not yet been claimed. | | `CONNECTING` | The device is establishing a connection with the PnP server. | | `ERROR_SECURING_CONNECTION` | The device failed to establish a connection with the PnP server (e.g., TLS/SSL issues). | | `ERROR_AUTHENTICATING` | The device failed to establish a secure connection with the PnP server. | | `INITIALIZING` | The PnP server is collecting initial device information. | | `INITIALIZED` | The PnP server has collected initial device information. | | `ERROR_INITIALIZING` | The PnP server failed to collect initial device information. | | `ERROR_INITIALIZED_TIMEOUT` | The device stopped contacting PnP server while collecting initial device information. | | `SUDI_AUTHORIZING` | The device is undergoing Secure Unique Device Identifier (SUDI) authorization. | | `ERROR_SUDI_AUTHORIZING` | The device failed during SUDI authorization. | | `SUDI_AUTHORIZED` | The device has successfully completed SUDI authorization. | | `EXECUTING_WORKFLOW` | The device is actively executing its onboarding workflow. | | `EXECUTED_WORKFLOW` | The device has successfully completed its onboarding workflow. | | `ERROR_EXECUTING_WORKFLOW` | The device encountered an error while executing the onboarding workflow. | | `EXECUTING_RESET` | The device is currently being reset. | | `ERROR_EXECUTING_RESET` | The device encountered an error while performing the reset. |. |
|
Order query parameter. Whether ascending or descending order should be used to sort the response. |
|
Pid query parameter. The product ID of the device. |
|
SerialNumber query parameter. The serial number of the device. |
|
SiteNameHierarchy query parameter. Hierarchical name of the site the device has been claimed to. A list of site names can be fetched from the `GET /dna/intent/api/v1/sites` API. |
|
SmartAccount query parameter. The Smart Account associated with the device. |
|
SortBy query parameter. A property within the response to sort by. |
|
Source query parameter. The method used to add the device to PnP. | status | Description | | ---------------------- | ------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------- ------------------ | | `NETWORK` | The device discovered and joined PnP over the network. | | `USER` | The device was added to PnP through the UI or API. | | `SMART_ACCOUNT` | The device redirected to PnP through PnP Connect service. |
|
State query parameter. The state of the device in the PnP process. Possible values are | State | Description |-----------------------------------|--------------------------------------------------------| | `UNCLAIMED` | Device has not yet been claimed. | | `PENDING_AUTHORIZATION` | Device has been claimed, but requires explicit authorization to start onboarding. This is applicable for Extended Node onboarding workflows. | | `PLANNED` | Device has been claimed. Once it discovers the PnP server, the onboarding workflow will begin. | | `ONBOARDING` | Device has begun the onboarding workflow. | | `PROVISIONED` | Device has completed the onboarding workflow. | | `ERROR` | Device could not complete the onboarding workflow. | | `RESETTING` | Device is in the process of being reset. | | `DELETED` | Device has been deleted and will soon be cleared from the database. |. |
|
SvlClaimable query parameter. Indicates whether the device has any neighbors capable of forming a StackWise-Virtual (SVL) link. Choices: |
|
SvlDevice query parameter. Indicates whether the device has a formed StackWise-Virtual (SVL) pair. Choices: |
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
|
VirtualAccount query parameter. The Virtual Account associated with the device. |
Notes
Note
SDK Method used are device_onboarding_pnp.DeviceOnboardingPnp.count_pnp_devices,
Paths used are get /dna/intent/api/v1/pnpNetworkDevices/count,
Supports
check_modeThe 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 Device Onboarding (PnP) CountPnPDevices
Complete reference of the CountPnPDevices API.
Examples
---
- name: Get all Pnp Network Devices Count
cisco.catalystcenter.pnp_network_devices_count_info:
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}}"
headers: "{{my_headers | from_json}}"
serialNumber: string
macAddress: str
state_: string
onboardingState: string
hostname: string
pid: string
siteNameHierarchy: string
source: string
smartAccount: string
virtualAccount: string
imageVersion: string
contactedStatus: string
svlClaimable: true
svlDevice: true
sortBy: string
order: asc
register: result
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 Catalyst Center Python SDK Returned: always Sample: :ansible-rv-sample-value:`{"response": {"count": 0}, "version": "string"}` |