cisco.catalystcenter.pnp_network_devices_info module -- Information module for Pnp Network Devices
Note
This module is part of the cisco.catalystcenter collection (version 2.12.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_info.
New in cisco.catalystcenter 2.11.0
Synopsis
Get all Pnp Network Devices.
Get Pnp Network Devices by id.
Retrieves details of Plug and Play PNP devices based on specified parameters.
Retrieves details of a specific Plug and Play PNP device using its unique identifier.
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. |
|
Id path parameter. Unique identifier for the device in PnP. |
|
ImageVersion query parameter. The image version of the device. |
|
Limit query parameter. The number of records to show for this page. |
|
MacAddress query parameter. The MAC address of the device. |
|
Offset query parameter. The first record to show for this page; the first record is numbered 1. |
|
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.get_pnp_device_details, device_onboarding_pnp.DeviceOnboardingPnp.get_pnp_device_details_by_id,
Paths used are get /dna/intent/api/v1/pnpNetworkDevices, get /dna/intent/api/v1/pnpNetworkDevices/{id},
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) GetPnPDeviceDetails
Complete reference of the GetPnPDeviceDetails API.
- Cisco Catalyst Center documentation for Device Onboarding (PnP) GetPnPDeviceDetailsByID
Complete reference of the GetPnPDeviceDetailsByID API.
Examples
---
- name: Get all Pnp Network Devices
cisco.catalystcenter.pnp_network_devices_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
offset: 1
limit: 0
sortBy: string
order: asc
register: result
- name: Get Pnp Network Devices by id
cisco.catalystcenter.pnp_network_devices_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}}"
id: string
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": {}, "version": "string"}` |