cisco.dnac.device_replacement (2.0.7) — module

Manage DeviceReplacement objects of DeviceReplacement

| "added in version" 1.0.0 of cisco.dnac"

Authors: Rafael Campos (@racampos)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install cisco.dnac:==2.0.7


Add to requirements.yml

  collections:
    - name: cisco.dnac
      version: 2.0.7

Description

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.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
count:
    description:
    - If true gets the number of objects.
    - Required for state query.
    type: bool

limit:
    description:
    - Limit query parameter.
    type: int

family:
    description:
    - List of families[Routers, Switches and Hubs, AP].
    type: str

offset:
    description:
    - Offset query parameter.
    type: int

payload:
    description:
    - An object to send in the Request body.
    elements: dict
    required: true
    suboptions:
      creationTime:
        description:
        - It is the device replacement's creationTime.
        type: int
      family:
        description:
        - It is the device replacement's family.
        type: str
      faultyDeviceId:
        description:
        - It is the device replacement's faultyDeviceId.
        - Required for states update and create.
        type: str
      faultyDeviceName:
        description:
        - It is the device replacement's faultyDeviceName.
        type: str
      faultyDevicePlatform:
        description:
        - It is the device replacement's faultyDevicePlatform.
        type: str
      faultyDeviceSerialNumber:
        description:
        - It is the device replacement's faultyDeviceSerialNumber.
        type: str
      id:
        description:
        - It is the device replacement's id.
        type: str
      neighbourDeviceId:
        description:
        - It is the device replacement's neighbourDeviceId.
        type: str
      networkReadinessTaskId:
        description:
        - It is the device replacement's networkReadinessTaskId.
        type: str
      replacementDevicePlatform:
        description:
        - It is the device replacement's replacementDevicePlatform.
        type: str
      replacementDeviceSerialNumber:
        description:
        - It is the device replacement's replacementDeviceSerialNumber.
        type: str
      replacementStatus:
        description:
        - It is the device replacement's replacementStatus.
        - Required for states update and create.
        type: str
      replacementTime:
        description:
        - It is the device replacement's replacementTime.
        type: int
      workflowId:
        description:
        - It is the device replacement's workflowId.
        type: str
    type: list

sort_by:
    description:
    - SortBy this field. SortBy is mandatory when order is used.
    type: str

sort_order:
    description:
    - Order on displayName[ASC,DESC].
    type: str

faulty_device_name:
    description:
    - Faulty Device Name.
    type: str

replacement_status:
    description:
    - '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].

      '
    type: str

faulty_device_platform:
    description:
    - Faulty Device Platform.
    type: str

faulty_device_serial_number:
    description:
    - Faulty Device Serial Number.
    type: str

replacement_device_platform:
    description:
    - Replacement Device Platform.
    type: str

replacement_device_serial_number:
    description:
    - Replacement Device Serial Number.
    type: str

Outputs

dnac_response:
  description: A dictionary with the response returned by the DNA Center Python SDK
  returned: always
  sample:
    response: 29
    version: '1.0'
  type: dict
missing_params:
  description: Provided arguments do not comply with the schema of the DNA Center
    Python SDK function
  returned: when the function request schema is not satisfied
  sample: null
  type: list
sdk_function:
  description: The DNA Center SDK function used to execute the task
  returned: always
  sample: device_replacement.mark_device_for_replacement
  type: str

See also