cisco-en-programmability/dnacentersdk

SDK function for version 2.3.3.x (v2_3_3_0 /device_onboarding_pnp.py) input requirment does not match with API schema from dnac,

Closed this issue · 2 comments

Prerequisites

  • [ Yes] Have you tested the operation in the API directly?
  • [Yes ] Do you have the latest SDK version?
  • Review the compatibility matrix before opening an issue.

Describe the bug
The schema of API on 2.3.3.x version from DNAC is different then the required parameters in this function.
def claim_a_device_to_a_site(self,
configInfo=None,
deviceId=None,
gateway=None,
hostname=None, <<======Not in API schema
imageId=None, <<=======Not in API Schema
imageInfo=None,
ipInterfaceName=None,
removeInactive=None, <<========Not in API schema.
rfProfile=None,
siteId=None,
staticIP=None,
subnetMask=None,
type=None,
vlanId=None,
headers=None,
payload=None,
active_validation=True,
**request_parameters):

Missing field fromAPI Schema: sensorProfile
DNAC version: 2.3.3.7

Expected behavior
Schema from DNAC:
root
(map, required)
: SiteProvisionRequest
deviceId
(string, required)
siteId
(string, required)
type
(string, optional, enum: Default, StackSwitch, AccessPoint, Sensor, CatalystWLC, MobilityExpress)
imageInfo
(map, optional)
: for Default/StackSwitch
imageId
(string, optional)
skip
(boolean, optional)
configInfo
(array, optional)
: for Default/StackSwitch
configId
(string, optional)
configParameters
(map, optional)
key
(string, optional)
value
(string, optional)
rfProfile
(string, required)
: for Access Points
staticIP
(string, required)
: for CatalystWLC/MobilityExpress
subnetMask
(string, required)
: for CatalystWLC/MobilityExpress
gateway
(string, required)
: for CatalystWLC/MobilityExpress
vlanID
(string, optional)
: for Catalyst 9800 WLC
interfaceName
(string, optional)
: for Catalyst 9800 WLC
sensorProfile
(string, required)
: for Sensors

Sample: {
"deviceId": "string",
"siteId": "string",
"type": "string",
"imageInfo": {
"imageId": "string",
"skip": "boolean"
},
"configInfo": [
{
"configId": "string",
"configParameters": {
"key": "string",
"value": "string"
}
}
],
"rfProfile": "string",
"staticIP": "string",
"subnetMask": "string",
"gateway": "string",
"vlanID": "string",
"interfaceName": "string",
"sensorProfile": "string"
}

Screenshots
Please provide an screenshot of the successful API call with cuRL, Postman, etc.

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: 2.3.3.7
  • Python version:3.9
  • SDK version:2.6.3
  • OS Version:

Additional context
Add any other context about the problem here.

Also vlanId ==> vlanID

Hi @DNACENSolutions please verify it in new SDK version, let us know if it works now.