Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RfProfile is required in pnp_device_claim_to_site #52

Closed
2 tasks done
beye91 opened this issue Mar 22, 2022 · 4 comments
Closed
2 tasks done

RfProfile is required in pnp_device_claim_to_site #52

beye91 opened this issue Mar 22, 2022 · 4 comments

Comments

@beye91
Copy link

beye91 commented Mar 22, 2022

Prerequisites

  • Have you tested the operation in the API directly?
  • Do you have the latest Ansible collection version?

Describe the bug
For onboarding on access point to the site the rfProfile is needed. The rfProfile is of course not needed for an switch!

A successful call from the API directly would look like this:

--data-raw '{"siteId":"ebb73862-9e5d-4405-8551-83677ffe9199","deviceId":"6239b85c64ffdd425b7a786d","hostname":"TEST","type":"AccessPoint","rfProfile":"TYPICAL"}'

The following playbook, which has all required variables will generate an error:

  cisco.dnac.pnp_device_claim_to_site:
    dnac_host: "{{ dnac_host }}"
    dnac_port: "{{ dnac_port }}"
    dnac_username: "{{ dnac_username }}"
    dnac_password: "{{ dnac_password }}"
    dnac_verify: "{{ dnac_verify }}"
    dnac_debug: "{{ dnac_debug }}"
    deviceId: "{{ device_id }}"
    siteId: "{{ site_id }}"
    type: "AccessPoint"
    hostname: "TEST" 
Response
	Status: 400 - Bad Request
	Headers: 
		Content-Type: application/json;charset=utf-8
		Transfer-Encoding: chunked
		Connection: keep-alive
		Date: Tue, 22 Mar 2022 12:01:45 GMT
		Server: webserver
		x-request-id: 1ab6da5b2f94b44086f5adcdf6a05bc5
		Vary: Origin
		Access-Control-Allow-Origin: dnac.dblab.local
		Via: api-gateway
		Cache-Control: no-store
		Pragma: no-cache
		Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data:
		X-Content-Type-Options: nosniff
		X-XSS-Protection: 1
		Strict-Transport-Security: max-age=31536000; includeSubDomains
		X-Frame-Options: SAMEORIGIN
	Body:
             {
                 "response": {
                     "errorCode": "NCOB01292",
                     "message": "NCOB01292: RfProfile is required",
                     "href": "/onboarding/pnp-device/site-claim"
                 },
                 "version": "1.0"
             }
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: dnacentersdk.exceptions.ApiError: [400] Bad Request - NCOB01292: RfProfile is required
fatal: [10.49.145.228]: FAILED! => {
    "changed": false
}

MSG:

An error occured when executing operation. The error was: [400] Bad Request - NCOB01292: RfProfile is required

Expected behavior
rfProfile needs to be set once the type AccessPoint is defined.

Environment (please complete the following information):

python -m pip list
Package            Version
------------------ ---------
ansible            5.5.0
ansible-core       2.12.3
certifi            2021.10.8
cffi               1.15.0
charset-normalizer 2.0.12
cryptography       36.0.2
dnacentersdk       2.4.6
fastjsonschema     2.15.3
future             0.18.2
idna               3.3
Jinja2             3.0.3
MarkupSafe         2.1.1
packaging          21.3
pip                21.3.1
pycparser          2.21
pyparsing          3.0.7
PyYAML             6.0
requests           2.27.1
requests-toolbelt  0.9.1
resolvelib         0.5.4
setuptools         60.5.0
urllib3            1.26.9
@fmunozmiranda
Copy link
Collaborator

Hi @beye91 , We are working on it, we will keep you updated.

@fmunozmiranda
Copy link
Collaborator

Hey @beye91, version 2.4.7 of dnacentersdk and 6.1.0 of dnacenter-ansible have been published, try these new versions and let us know if it is working for you now.

@beye91
Copy link
Author

beye91 commented Mar 22, 2022

Hey @fmunozmiranda thank you so much! The issue has been solved. I have been able to claim the device 👍

TASK [debug] *********************************************************************************************************************
ok: [10.49.145.228] => {
    "claim_result": {
        "changed": false,
        "dnac_response": {
            "response": "Device Claimed",
            "version": "1.0"
        },
        "failed": false,
        "result": ""
    }
}

@fmunozmiranda
Copy link
Collaborator

With pleasure @beye91, in case of any other issue you just open the case.

fmunozmiranda pushed a commit that referenced this issue Dec 19, 2023
Add code for Inventory Module with more update operations
syed-khadeerahmed pushed a commit to syed-khadeerahmed/dnacenter-ansible that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants