cisco.catalystcenter.network_device_replacements_info module -- Information module for Network Device Replacements
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.network_device_replacements_info.
New in cisco.catalystcenter 2.0.0
Synopsis
Get all Network Device Replacements.
Get Network Device Replacements by id. - > Fetches the status of the device replacement workflow for a given device replacement `id`. Invoke the API `/dna/intent/api/v1/networkDeviceReplacements` to `GET` the list of all device replacements and use the `id` field data as input to this API. - > Retrieve device replacements with replacement details. Filterable by faulty device name, platform, serial number, replacement device platform, serial number, replacement status, device family, and out-of-band manual device replacement performed outside the system .
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"` |
|
Family query parameter. Faulty device family. |
|
FaultyDeviceName query parameter. Faulty device name. |
|
FaultyDevicePlatform query parameter. Faulty device platform. |
|
FaultyDeviceSerialNumber query parameter. Faulty device serial number. |
|
Additional headers. |
|
Id path parameter. Instance UUID of the device replacement. |
|
Limit query parameter. The number of records to show for this page. |
|
Offset query parameter. The first record to show for this page; the first record is numbered 1. |
|
OutOfBand query parameter. Device replacements that were performed manually outside the system (out-of-band). Choices: |
|
ReplacementDevicePlatform query parameter. Replacement device platform. |
|
ReplacementDeviceSerialNumber query parameter. Replacement device serial number. |
|
ReplacementStatus query parameter. Device replacement status. Available values `MARKED_FOR_REPLACEMENT` - The faulty device has been marked for replacement. `NETWORK_READINESS_REQUESTED` - Initiated steps to shut down neighboring device interfaces and create a DHCP server on the uplink neighbor if the faulty device is part of a fabric setup. `NETWORK_READINESS_FAILED` - Preparation of the network failed. Neighboring device interfaces were not shut down, and the DHCP server on the uplink neighbor was not created. `READY_FOR_REPLACEMENT` - The network is prepared for the faulty device replacement. Neighboring device interfaces are shut down, and the DHCP server on the uplink neighbor is set up. `REPLACEMENT_SCHEDULED` - Device replacement has been scheduled. `REPLACEMENT_IN_PROGRESS` - Device replacement is currently in progress. `REPLACED` - Device replacement was successful. `ERROR` - Device replacement has failed. |
|
SortBy query parameter. A property within the response to sort by. |
|
SortOrder query parameter. Whether ascending or descending order should be used to sort the response. |
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
SDK Method used are device_replacement.DeviceReplacement.retrieve_the_status_of_all_the_device_replacement_workflows, device_replacement.DeviceReplacement.retrieve_the_status_of_device_replacement_workflow_that_replaces_a_faulty_device_with_a_replacement_device,
Paths used are get /dna/intent/api/v1/networkDeviceReplacements, get /dna/intent/api/v1/networkDeviceReplacements/{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 Replacement RetrieveTheStatusOfAllTheDeviceReplacementWorkflows
Complete reference of the RetrieveTheStatusOfAllTheDeviceReplacementWorkflows API.
- Cisco Catalyst Center documentation for Device Replacement RetrieveTheStatusOfDeviceReplacementWorkflowThatReplacesAFaultyDeviceWithAReplacementDevice
Complete reference of the RetrieveTheStatusOfDeviceReplacementWorkflowThatReplacesAFaultyDeviceWithAReplacementDevice API.
Examples
---
- name: Get all Network Device Replacements
cisco.catalystcenter.network_device_replacements_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}}"
family: string
faultyDeviceName: string
faultyDevicePlatform: string
faultyDeviceSerialNumber: string
replacementDevicePlatform: string
replacementDeviceSerialNumber: string
outOfBand: true
replacementStatus: REPLACEMENT_IN_PROGRESS
offset: 1
limit: 0
sortBy: creationTime
sortOrder: ASC
register: result
- name: Get Network Device Replacements by id
cisco.catalystcenter.network_device_replacements_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 |
|---|---|