cisco.dnac.pnp_workflow (2.0.7) — module

Manage PnpWorkflow objects of DeviceOnboardingPnp

| "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

Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.

Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.

Returns a workflow specified by id.

Deletes a workflow specified by id.

Updates an existing workflow.

Returns the workflow count.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_workflows
  cisco.dnac.pnp_workflow:
    state: query  # required
    limit: 1  #  integer
    name: SomeValue  # string
    offset: 1  #  integer
    sort: SomeValue  # string
    sort_order: SomeValue  # string
    type: SomeValue  # string
  register: nm_get_workflows
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: add_a_workflow
  cisco.dnac.pnp_workflow:
    state: create  # required
    _id: SomeValue  # string
    addToInventory: True  # boolean
    addedOn: 1  #  integer
    configId: SomeValue  # string
    currTaskIdx: 1  #  integer
    description: SomeValue  # string
    endTime: 1  #  integer
    execTime: 1  #  integer
    imageId: SomeValue  # string
    instanceType: # valid values are 'SystemWorkflow',
      # 'UserWorkflow',
      # 'SystemResetWorkflow'.
      SomeValue  # string
    lastupdateOn: 1  #  integer
    name: SomeValue  # string
    startTime: 1  #  integer
    _state: SomeValue  # string
    tasks:
    - currWorkItemIdx: 1  #  integer
      endTime: 1  #  integer
      name: SomeValue  # string
      startTime: 1  #  integer
      state: SomeValue  # string
      taskSeqNo: 1  #  integer
      timeTaken: 1  #  integer
      type: SomeValue  # string
      workItemList:
      - command: SomeValue  # string
        endTime: 1  #  integer
        outputStr: SomeValue  # string
        startTime: 1  #  integer
        state: SomeValue  # string
        timeTaken: 1  #  integer
    tenantId: SomeValue  # string
    type: SomeValue  # string
    useState: SomeValue  # string
    version: 1  #  integer
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_workflow_by_id
  cisco.dnac.pnp_workflow:
    state: query  # required
    id: SomeValue  # string, required
  register: nm_get_workflow_by_id
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete_workflow_by_id
  cisco.dnac.pnp_workflow:
    state: delete  # required
    id: SomeValue  # string, required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: update_workflow
  cisco.dnac.pnp_workflow:
    state: update  # required
    id: SomeValue  # string, required
    _id: SomeValue  # string
    addToInventory: True  # boolean
    addedOn: 1  #  integer
    configId: SomeValue  # string
    currTaskIdx: 1  #  integer
    description: SomeValue  # string
    endTime: 1  #  integer
    execTime: 1  #  integer
    imageId: SomeValue  # string
    instanceType: # valid values are 'SystemWorkflow',
      # 'UserWorkflow',
      # 'SystemResetWorkflow'.
      SomeValue  # string
    lastupdateOn: 1  #  integer
    name: SomeValue  # string
    startTime: 1  #  integer
    _state: SomeValue  # string
    tasks:
    - currWorkItemIdx: 1  #  integer
      endTime: 1  #  integer
      name: SomeValue  # string
      startTime: 1  #  integer
      state: SomeValue  # string
      taskSeqNo: 1  #  integer
      timeTaken: 1  #  integer
      type: SomeValue  # string
      workItemList:
      - command: SomeValue  # string
        endTime: 1  #  integer
        outputStr: SomeValue  # string
        startTime: 1  #  integer
        state: SomeValue  # string
        timeTaken: 1  #  integer
    tenantId: SomeValue  # string
    type: SomeValue  # string
    useState: SomeValue  # string
    version: 1  #  integer
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_workflow_count
  cisco.dnac.pnp_workflow:
    state: query  # required
    count: True  # boolean, required
    name: SomeValue  # string
  register: nm_get_workflow_count

Inputs

    
id:
    description:
    - Id path parameter.
    required: true
    type: str

_id:
    description:
    - Workflow's _id.
    type: str

name:
    description:
    - Workflow Name.
    - Workflow's name.
    type: str

sort:
    description:
    - Comma seperated lost of fields to sort on.
    type: str

type:
    description:
    - Workflow Type.
    - Workflow's type.
    type: str

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

limit:
    description:
    - Limits number of results.
    type: int

tasks:
    description:
    - Workflow's tasks (list of objects).
    elements: dict
    suboptions:
      currWorkItemIdx:
        description:
        - It is the pnp workflow's currWorkItemIdx.
        type: int
      endTime:
        description:
        - It is the pnp workflow's endTime.
        type: int
      name:
        description:
        - It is the pnp workflow's name.
        type: str
      startTime:
        description:
        - It is the pnp workflow's startTime.
        type: int
      state:
        description:
        - It is the pnp workflow's state.
        type: str
      taskSeqNo:
        description:
        - It is the pnp workflow's taskSeqNo.
        type: int
      timeTaken:
        description:
        - It is the pnp workflow's timeTaken.
        type: int
      type:
        description:
        - It is the pnp workflow's type.
        type: str
      workItemList:
        description:
        - It is the pnp workflow's workItemList.
        elements: dict
        suboptions:
          command:
            description:
            - It is the pnp workflow's command.
            type: str
          endTime:
            description:
            - It is the pnp workflow's endTime.
            type: int
          outputStr:
            description:
            - It is the pnp workflow's outputStr.
            type: str
          startTime:
            description:
            - It is the pnp workflow's startTime.
            type: int
          state:
            description:
            - It is the pnp workflow's state.
            type: str
          timeTaken:
            description:
            - It is the pnp workflow's timeTaken.
            type: int
        type: list
    type: list

_state:
    description:
    - Workflow's state.
    type: str

offset:
    description:
    - Index of first result.
    type: int

addedOn:
    description:
    - Workflow's addedOn.
    type: int

endTime:
    description:
    - Workflow's endTime.
    type: int

imageId:
    description:
    - Workflow's imageId.
    type: str

version:
    description:
    - Workflow's version.
    type: int

configId:
    description:
    - Workflow's configId.
    type: str

execTime:
    description:
    - Workflow's execTime.
    type: int

tenantId:
    description:
    - Workflow's tenantId.
    type: str

useState:
    description:
    - Workflow's useState.
    type: str

startTime:
    description:
    - Workflow's startTime.
    type: int

sort_order:
    description:
    - Sort Order Ascending (asc) or Descending (des).
    type: str

currTaskIdx:
    description:
    - Workflow's currTaskIdx.
    type: int

description:
    description:
    - Workflow's description.
    type: str

instanceType:
    description:
    - Workflow's instanceType.
    type: str

lastupdateOn:
    description:
    - Workflow's lastupdateOn.
    type: int

addToInventory:
    description:
    - Workflow's addToInventory.
    type: bool

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_onboarding_pnp.add_a_workflow
  type: str

See also