-
Notifications
You must be signed in to change notification settings - Fork 44
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
meraki_device making wrong API call #463
Comments
Thank you for reporting this. It's quite an interesting bug as well. I do store some URLs in the shared code between modules but I can't tell why that particular URL is called. Give me a little time to look into this. |
I think I've identified why it's failing. Can you try to use net_id instead of net_name? I expect it will work. If it does work, please let me know if your organization has any config templates. |
My theory was if an organization had no configuration templates it would give a 404 but that's not the case. Unfortunately, I can't reproduce the bug. Can you describe your organization/network environment in some detail, especially around the configuration templates, so I can see if I can reproduce it? Thank you. |
Thanks for this - I've tried using every combination of org_name, org_id, net_name and net_id with two networks, but get the same response in all cases (the org string being passed to the config_templates call). I also encountered a similar issue with the ACLs module, and in that case was actually able to get that to work by using the net_id rather than net_name, interestingly. The org in question is currently in the process of being handed over to us, so don't have full visibility r.e. configuration templates, but will try to find out. |
Thank you. Let me know what you find out. I haven't been able to reproduce it but I think I see where it's happening. When the module downloads all the networks it also downloads all the configuration templates at
request() method and if it has an error code above 400, it errors https://github.com/CiscoDevNet/ansible-meraki/blob/6456adf4f82dcb7931054bf411a270014f5baaf4/plugins/module_utils/network/meraki/meraki.py#L436C13-L436C13.
By chance, do you have access to an API tool like Postman to do some testing to see how we can get that to work? |
Thanks for looking into this. Just heard from the other team, they confirmed that no configuration templates are currently in use. Also tried omitting both net_id and net_name from the play (so ommitting network altogether) and just using org_name, and still hitting the same error.
This I've now noticed with several modules, but in all other cases except the meraki_device one, using net_id prevents the issue from happening. The organization currently consists of 3 distinct networks - an appliance one, switched and wireless and a combined one. I do have Postman setup. Which tests did you have in mind? Right off the bat I can say that running {{baseUrl}}/organizations/:organizationId/devices returns succesfully. |
Can you try testing ansible-meraki/plugins/module_utils/network/meraki/meraki.py Lines 267 to 269 in 6456adf
|
Trying the first example from the doc 'query all devices', substituting the dummy values for my own:
Might be missing something, but I'm getting this return -
So it doesn't seem to be hitting the devices API, rather the configTemplates one.
Module version is 2.15.3
The text was updated successfully, but these errors were encountered: