cisco.dnac.pnp_device_info – Information module for Pnp Device

Note

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

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

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

New in version 1.0.0: of cisco.dnac

Synopsis

  • Get all Pnp Device.

  • Get Pnp Device by id.

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
cmState
list / elements=string
CmState query parameter. Device Connection Manager State.
hostname
string
Hostname query parameter. Device Hostname.
id
string
Id path parameter.
lastContact
boolean
    Choices:
  • no
  • yes
LastContact query parameter. Device Has Contacted lastContact > 0.
limit
integer
Limit query parameter. Limits number of results.
macAddress
string
MacAddress query parameter. Device Mac Address.
name
list / elements=string
Name query parameter. Device Name.
offset
integer
Offset query parameter. Index of first result.
onbState
list / elements=string
OnbState query parameter. Device Onboarding State.
pid
list / elements=string
Pid query parameter. Device ProductId.
projectId
list / elements=string
ProjectId query parameter. Device Project Id.
projectName
list / elements=string
ProjectName query parameter. Device Project Name.
serialNumber
list / elements=string
SerialNumber query parameter. Device Serial Number.
siteName
string
SiteName query parameter. Device Site Name.
smartAccountId
list / elements=string
SmartAccountId query parameter. Device Smart Account.
sort
list / elements=string
Sort query parameter. Comma seperated list of fields to sort on.
sortOrder
string
SortOrder query parameter. Sort Order Ascending (asc) or Descending (des).
source
list / elements=string
Source query parameter. Device Source.
state_
list / elements=string
State query parameter. Device State.
virtualAccountId
list / elements=string
VirtualAccountId query parameter. Device Virtual Account.
workflowId
list / elements=string
WorkflowId query parameter. Device Workflow Id.
workflowName
list / elements=string
WorkflowName query parameter. Device Workflow Name.

See Also

See also

Pnp Device reference

Complete reference of the Pnp Device object model.

Examples

- name: Get all Pnp Device
  cisco.dnac.pnp_device_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    limit: 0
    offset: 0
    sort: []
    sortOrder: string
    serialNumber: []
    state_: []
    onbState: []
    cmState: []
    name: []
    pid: []
    source: []
    projectId: []
    workflowId: []
    projectName: []
    workflowName: []
    smartAccountId: []
    virtualAccountId: []
    lastContact: True
    macAddress: string
    hostname: string
    siteName: string
  register: result

- name: Get Pnp Device by id
  cisco.dnac.pnp_device_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    id: string
  register: result

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 or list with the response returned by the Cisco DNAC Python SDK

Sample:
{ "_id": "string", "deviceInfo": { "source": "string", "serialNumber": "string", "stack": true, "mode": "string", "state": "string", "location": { "siteId": "string", "address": "string", "latitude": "string", "longitude": "string", "altitude": "string" }, "description": "string", "onbState": "string", "authenticatedMicNumber": "string", "authenticatedSudiSerialNo": "string", "capabilitiesSupported": [ "string" ], "featuresSupported": [ "string" ], "cmState": "string", "firstContact": 0, "lastContact": 0, "macAddress": "string", "pid": "string", "deviceSudiSerialNos": [ "string" ], "lastUpdateOn": 0, "workflowId": "string", "workflowName": "string", "projectId": "string", "projectName": "string", "deviceType": "string", "agentType": "string", "imageVersion": "string", "fileSystemList": [ { "type": "string", "writeable": true, "freespace": 0, "name": "string", "readable": true, "size": 0 } ], "pnpProfileList": [ { "profileName": "string", "discoveryCreated": true, "createdBy": "string", "primaryEndpoint": { "port": 0, "protocol": "string", "ipv4Address": {}, "ipv6Address": {}, "fqdn": "string", "certificate": "string" }, "secondaryEndpoint": { "port": 0, "protocol": "string", "ipv4Address": {}, "ipv6Address": {}, "fqdn": "string", "certificate": "string" } } ], "imageFile": "string", "httpHeaders": [ { "key": "string", "value": "string" } ], "neighborLinks": [ { "localInterfaceName": "string", "localShortInterfaceName": "string", "localMacAddress": "string", "remoteInterfaceName": "string", "remoteShortInterfaceName": "string", "remoteMacAddress": "string", "remoteDeviceName": "string", "remotePlatform": "string", "remoteVersion": "string" } ], "lastSyncTime": 0, "ipInterfaces": [ { "status": "string", "macAddress": "string", "ipv4Address": {}, "ipv6AddressList": [], "name": "string" } ], "hostname": "string", "authStatus": "string", "stackInfo": { "supportsStackWorkflows": true, "isFullRing": true, "stackMemberList": [ { "serialNumber": "string", "state": "string", "role": "string", "macAddress": "string", "pid": "string", "licenseLevel": "string", "licenseType": "string", "sudiSerialNumber": "string", "hardwareVersion": "string", "stackNumber": 0, "softwareVersion": "string", "priority": 0 } ], "stackRingProtocol": "string", "validLicenseLevels": [ "string" ], "totalMemberCount": 0 }, "reloadRequested": true, "addedOn": 0, "siteId": "string", "aaaCredentials": { "password": "string", "username": "string" }, "userMicNumbers": [ "string" ], "userSudiSerialNos": [ "string" ], "addnMacAddrs": [ "string" ], "preWorkflowCliOuputs": [ { "cli": "string", "cliOutput": "string" } ], "tags": {}, "sudiRequired": true, "smartAccountId": "string", "virtualAccountId": "string", "populateInventory": true, "siteName": "string", "name": "string" }, "systemResetWorkflow": { "_id": "string", "state": "string", "type": "string", "description": "string", "lastupdateOn": 0, "imageId": "string", "currTaskIdx": 0, "addedOn": 0, "tasks": [ { "state": "string", "type": "string", "currWorkItemIdx": 0, "taskSeqNo": 0, "endTime": 0, "startTime": 0, "workItemList": [ { "state": "string", "command": "string", "outputStr": "string", "endTime": 0, "startTime": 0, "timeTaken": 0 } ], "timeTaken": 0, "name": "string" } ], "addToInventory": true, "instanceType": "string", "endTime": 0, "execTime": 0, "startTime": 0, "useState": "string", "configId": "string", "name": "string", "version": 0, "tenantId": "string" }, "systemWorkflow": { "_id": "string", "state": "string", "type": "string", "description": "string", "lastupdateOn": 0, "imageId": "string", "currTaskIdx": 0, "addedOn": 0, "tasks": [ { "state": "string", "type": "string", "currWorkItemIdx": 0, "taskSeqNo": 0, "endTime": 0, "startTime": 0, "workItemList": [ { "state": "string", "command": "string", "outputStr": "string", "endTime": 0, "startTime": 0, "timeTaken": 0 } ], "timeTaken": 0, "name": "string" } ], "addToInventory": true, "instanceType": "string", "endTime": 0, "execTime": 0, "startTime": 0, "useState": "string", "configId": "string", "name": "string", "version": 0, "tenantId": "string" }, "workflow": { "_id": "string", "state": "string", "type": "string", "description": "string", "lastupdateOn": 0, "imageId": "string", "currTaskIdx": 0, "addedOn": 0, "tasks": [ { "state": "string", "type": "string", "currWorkItemIdx": 0, "taskSeqNo": 0, "endTime": 0, "startTime": 0, "workItemList": [ { "state": "string", "command": "string", "outputStr": "string", "endTime": 0, "startTime": 0, "timeTaken": 0 } ], "timeTaken": 0, "name": "string" } ], "addToInventory": true, "instanceType": "string", "endTime": 0, "execTime": 0, "startTime": 0, "useState": "string", "configId": "string", "name": "string", "version": 0, "tenantId": "string" }, "runSummaryList": [ { "details": "string", "historyTaskInfo": { "type": "string", "workItemList": [ { "state": "string", "command": "string", "outputStr": "string", "endTime": 0, "startTime": 0, "timeTaken": 0 } ], "timeTaken": 0, "addnDetails": [ { "key": "string", "value": "string" } ], "name": "string" }, "errorFlag": true, "timestamp": 0 } ], "workflowParameters": { "topOfStackSerialNumber": "string", "licenseLevel": "string", "licenseType": "string", "configList": [ { "configParameters": [ { "key": "string", "value": "string" } ], "configId": "string" } ] }, "dayZeroConfig": { "config": "string" }, "dayZeroConfigPreview": {}, "version": 0, "tenantId": "string" }


Authors

  • Rafael Campos (@racampos)