Unable to claim device and populate template
Closed this issue · 1 comments
aoforb commented
SUMMARY
Unable to claim device and populate template
ISSUE TYPE
- Bug Report
COMPONENT NAME
claim_a_device_to_a_site
PYTHON VERSION
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/opt/venv/ansible/bin/python3.10)
jinja version = 3.1.2
OS / ENVIRONMENT
Ubuntu 22.02
STEPS TO REPRODUCE
result = dnac.device_onboarding_pnp.claim_a_device_to_a_site(
configInfo=[{'configId': 'b6a0cea9-6819-44f7-9f78-1e7dfb8844f4' , 'configParameters': [{'key': 'hostname', 'value': 'Router1'}]}],
deviceId='65689e569169745466b919ed',
imageInfo={'imageId': 'db05e213-f915-4a55-a0a7-656a92247170'}
siteId='9a39cfa2-64c1-4c1c-945c-8247192ebc96',
type='Default'
)
EXPECTED RESULTS
Device should be claimed and I think the template is populated with the variables from configParameters
ACTUAL RESULTS
ApiError: [500] Server Error - JSON parse error: Cannot deserialize instance of `com.cisco.pnp.api.model.ConfigTask$ConfigInfo` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `com.cisco.pnp.api.model.ConfigTask$ConfigInfo` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 125] (through reference chain: com.cisco.pnp.api.model.DefaultProvisionRequest["configInfo"])
aoforb commented