cisco.dnac.pnp_intent module – Resource module for Site and PnP related functions
Note
This module is part of the cisco.dnac collection (version 6.10.1).
To install it, use: ansible-galaxy collection install cisco.dnac.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.dnac.pnp_intent.
New in cisco.dnac 6.6.0
Synopsis
Manage operations add device, claim device and unclaim device of Onboarding Configuration(PnP) resource
API to add device to pnp inventory and claim it to a site.
API to delete device from the pnp inventory.
API to reset the device from errored state.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk == 2.6.10
python >= 3.5
Parameters
Parameter |
Comments |
|---|---|
List of details of device being managed. |
|
Pnp Device’s device_info. This is mainly for adding the devices that are not a part of the PnP database. For single addition the length of the list must be equal to one. Followed by single addition a device can be claimed as well if site name is provided. For Bulk Import of devices the size of the list must be greater than 1 and can be only used for adding. For claiming the devices please use separate tasks or configs in the case of bulk import. |
|
Pnp Device’s hostname that we want to keep post claiming. Hostname can only be changed during claiming not bulk adding/ single adding |
|
Sudi Authentication requiremnet’s flag. Choices: |
|
Pnp Device’s pid. |
|
Pnp Device’s serial_number. |
|
Pnp Device’s onbording state (Unclaimed/Claimed/Provisioned). |
|
Gateway IP address of the Wireless Controller for getting pinged |
|
Is the image to be condifgured tagged as golden image Choices: |
|
Name of image to be configured on the device |
|
Name of the Interface used for Pnp by the Wireless Controller |
|
Device type of the Pnp device (Default/catalyst_wlc/access_point/stack_switch) Default: :ansible-option-default:`"Default"` |
|
Name of the project under which the template is present Default: :ansible-option-default:`"Onboarding Configuration"` |
|
Radio frequecy profile of the AP being claimed (HIGH/LOW/TYPICAL) |
|
Name of the site for which device will be claimed. |
|
Management IP address of the Wireless Controller |
|
Subnet Mask of the Management IP address of the Wireless Controller |
|
Name of template to be configured on the device. |
|
Parameter values for the parameterised templates. Each varibale has a value that needs to be passed as key-value pair in the dictionary. We can pass values as variable_name:variable_value. |
|
Vlan Id allocated for claimimg of Wireless Controller |
|
Set to True to verify the Cisco DNA Center config after applying the playbook config. Choices: |
|
Flag for Cisco DNA Center SDK to enable debugging. Choices: |
|
The Cisco DNA Center hostname. |
|
Flag for logging playbook execution details. If set to true the log file will be created at the location of the execution with the name dnac.log Choices: |
|
The Cisco DNA Center password to authenticate. |
|
The Cisco DNA Center port. Default: :ansible-option-default:`"443"` |
|
The Cisco DNA 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 DNA Center to use. Default: :ansible-option-default:`"2.2.3.3"` |
|
The state of DNAC after module completion. Choices: |
|
Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
SDK Method used are device_onboarding_pnp.DeviceOnboardingPnp.add_device, device_onboarding_pnp.DeviceOnboardingPnp.get_device_list, device_onboarding_pnp.DeviceOnboardingPnp.claim_a_device_to_a_site, device_onboarding_pnp.DeviceOnboardingPnp.delete_device_by_id_from_pnp, device_onboarding_pnp.DeviceOnboardingPnp.get_device_count, device_onboarding_pnp.DeviceOnboardingPnp.get_device_by_id, device_onboarding_pnp.DeviceOnboardingPnp.update_device, sites.Sites.get_site, software_image_management_swim.SoftwareImageManagementSwim.get_software_image_details, configuration_templates.ConfigurationTemplates.gets_the_templates_available
Paths used are post /dna/intent/api/v1/onboarding/pnp-device post /dna/intent/api/v1/onboarding/pnp-device/site-claim post /dna/intent/api/v1/onboarding/pnp-device/{id} get /dna/intent/api/v1/onboarding/pnp-device/count get /dna/intent/api/v1/onboarding/pnp-device put /onboarding/pnp-device/${id} get /dna/intent/api/v1/site get /dna/intent/api/v1/image/importation get /dna/intent/api/v1/template-programmer/template
Does not support
check_modeThe plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK
The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection
Examples
- name: Add a new device and claim the device
cisco.dnac.pnp_intent:
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}}"
dnac_log: True
state: merged
config_verify: True
config:
- template_name: string
image_name: string
golden_image: bool
site_name: string
project_name: string
pnp_type: string
static_ip: string
subnet_mask: string
gateway: string
vlan_id: string
ip_interface_name: string
rf_profile: string
device_info:
- hostname: string
state: string
pid: string
serial_number: string
add_device_method: string
is_sudi_required: string
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A dictionary with the response returned by the Cisco DNAC Python SDK Returned: always |
|
A list with the response returned by the Cisco DNAC Python SDK Returned: always Sample: :ansible-rv-sample-value:`["{\\n \\"response\\": []", "\\n \\"msg\\": String\\n}\\n"]` |
|
A string with the response returned by the Cisco DNAC Python SDK Returned: always Sample: :ansible-rv-sample-value:`"{\\n \\"response\\": String,\\n \\"msg\\": String\\n}\\n"` |
Authors
Madhan Sankaranarayanan (@madhansansel) Rishita Chowdhary (@rishitachowdhary) Abinash Mishra (@abimishr)