cisco.dnac.device_replacement – Manage DeviceReplacement objects of DeviceReplacement

Note

This plugin is part of the cisco.dnac collection (version 2.0.7).

To install it use: ansible-galaxy collection install cisco.dnac.

To use it in a playbook, specify: cisco.dnac.device_replacement.

New in version 1.0.0: of cisco.dnac

Synopsis

  • Get list of replacement devices with replacement details and it can filter replacement devices based on Faulty Device Name,Faulty Device Platform, Replacement Device Platform, Faulty Device Serial Number,Replacement Device Serial Number, Device Replacement status, Product Family.

  • Marks device for replacement.

  • UnMarks device for replacement.

  • Get replacement devices count.

Note

This module has a corresponding action plugin.

Requirements

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

  • dnacentersdk

Parameters

Parameter Choices/Defaults Comments
count
boolean
    Choices:
  • no
  • yes
If true gets the number of objects.
Required for state query.
family
string
List of families[Routers, Switches and Hubs, AP].
faulty_device_name
string
Faulty Device Name.
faulty_device_platform
string
Faulty Device Platform.
faulty_device_serial_number
string
Faulty Device Serial Number.
limit
integer
Limit query parameter.
offset
integer
Offset query parameter.
payload
list / elements=dictionary / required
An object to send in the Request body.
creationTime
integer
It is the device replacement's creationTime.
family
string
It is the device replacement's family.
faultyDeviceId
string
It is the device replacement's faultyDeviceId.
Required for states update and create.
faultyDeviceName
string
It is the device replacement's faultyDeviceName.
faultyDevicePlatform
string
It is the device replacement's faultyDevicePlatform.
faultyDeviceSerialNumber
string
It is the device replacement's faultyDeviceSerialNumber.
id
string
It is the device replacement's id.
neighbourDeviceId
string
It is the device replacement's neighbourDeviceId.
networkReadinessTaskId
string
It is the device replacement's networkReadinessTaskId.
replacementDevicePlatform
string
It is the device replacement's replacementDevicePlatform.
replacementDeviceSerialNumber
string
It is the device replacement's replacementDeviceSerialNumber.
replacementStatus
string
It is the device replacement's replacementStatus.
Required for states update and create.
replacementTime
integer
It is the device replacement's replacementTime.
workflowId
string
It is the device replacement's workflowId.
replacement_device_platform
string
Replacement Device Platform.
replacement_device_serial_number
string
Replacement Device Serial Number.
replacement_status
string
Device Replacement status [READY-FOR-REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR, NETWORK_READINESS_REQUESTED, NETWORK_READINESS_FAILED].
Device Replacement status list[READY-FOR-REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR].
sort_by
string
SortBy this field. SortBy is mandatory when order is used.
sort_order
string
Order on displayName[ASC,DESC].

See Also

See also

cisco.dnac.plugins.module_utils.definitions.device_replacement

The official documentation on the cisco.dnac.plugins.module_utils.definitions.device_replacement module.

DeviceReplacement reference

Complete reference of the DeviceReplacement object model.

DeviceReplacement reference

SDK reference.

Examples

- name: return_replacement_devices_with_details
  cisco.dnac.device_replacement:
    state: query  # required
    family: SomeValue  # string
    faulty_device_name: SomeValue  # string
    faulty_device_platform: SomeValue  # string
    faulty_device_serial_number: SomeValue  # string
    limit: 1  #  integer
    offset: 1  #  integer
    replacement_device_platform: SomeValue  # string
    replacement_device_serial_number: SomeValue  # string
    replacement_status: SomeValue  # string
    sort_by: SomeValue  # string
    sort_order: SomeValue  # string
  register: nm_return_replacement_devices_with_details

- name: mark_device_for_replacement
  cisco.dnac.device_replacement:
    state: create  # required
    payload:  # required
    - faultyDeviceId: SomeValue  # string, required
      replacementStatus: SomeValue  # string, required
      creationTime: 1  #  integer
      family: SomeValue  # string
      faultyDeviceName: SomeValue  # string
      faultyDevicePlatform: SomeValue  # string
      faultyDeviceSerialNumber: SomeValue  # string
      id: SomeValue  # string
      neighbourDeviceId: SomeValue  # string
      networkReadinessTaskId: SomeValue  # string
      replacementDevicePlatform: SomeValue  # string
      replacementDeviceSerialNumber: SomeValue  # string
      replacementTime: 1  #  integer
      workflowId: SomeValue  # string

- name: unmark_device_for_replacement
  cisco.dnac.device_replacement:
    state: update  # required
    payload:  # required
    - faultyDeviceId: SomeValue  # string, required
      replacementStatus: SomeValue  # string, required
      creationTime: 1  #  integer
      family: SomeValue  # string
      faultyDeviceName: SomeValue  # string
      faultyDevicePlatform: SomeValue  # string
      faultyDeviceSerialNumber: SomeValue  # string
      id: SomeValue  # string
      neighbourDeviceId: SomeValue  # string
      networkReadinessTaskId: SomeValue  # string
      replacementDevicePlatform: SomeValue  # string
      replacementDeviceSerialNumber: SomeValue  # string
      replacementTime: 1  #  integer
      workflowId: SomeValue  # string

- name: return_replacement_devices_count
  cisco.dnac.device_replacement:
    state: query  # required
    count: True  # boolean, required
    replacement_status: SomeValue  # string
  register: nm_return_replacement_devices_count

Return Values

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

Key Returned Description
dnac_response
dictionary
always
A dictionary with the response returned by the DNA Center Python SDK

Sample:
{'response': 29, 'version': '1.0'}
missing_params
list / elements=string
when the function request schema is not satisfied
Provided arguments do not comply with the schema of the DNA Center Python SDK function

sdk_function
string
always
The DNA Center SDK function used to execute the task

Sample:
device_replacement.mark_device_for_replacement


Authors

  • Rafael Campos (@racampos)