-
Notifications
You must be signed in to change notification settings - Fork 55
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
[Bug]: netscaler.adc.policypatset: policypatset_pattern_binding: binding_members returning "KeyError: string" error #348
Comments
@sscottkeefe, thank you for raising the request. Can you please help me with the workflow? If you could use NSCLI for your work, which commands would you use? This helps to reproduce the issue faster and give the fix quicker. Thank you |
Correct, the policy already exists (e.g. "Placeholder_Name"). I'm just trying to add an additional pattern (e.g. "placeholder-dev.test.com") to the three that already exist. As I understand it, the CLI approach is: bind policy patset Placeholder_Name placeholder-dev.test.com I pulled that from a request I previously sent to our internal networking team that has been completed. |
I don't know how relevant this will be, but I've noticed that the module specific to the pattern binding does not return the KeyError, just an expected 403 error because of the user I'm using being read-only.
|
NITRO was returning some keys with capitalised form. Converted the keys to lowercase Signed-off-by: Sumanth Lingappa <sumanth.lingappa@cloud.com>
Signed-off-by: Sumanth Lingappa <sumanth.lingappa@cloud.com>
Thank you for your further information. This is fixed in the above PR. To download the latest unreleased ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" --force |
Thanks a lot, all looks well with the latest from Git. I also noticed errors when re-running with an existing pattern in the past with the policypatset_pattern_binding module, but that's also resolved. |
Summary
When I run the policypatset module with the pattern binding and binding_members, it just returns an error even though I seemingly have used valid formatting; it's difficult to say if it's a fault of my own when I can't find any official or otherwise examples for this particular module, but I've tried to follow documentation I've found. For what it's worth, there are existing patterns as outlined in the output below.
Issue Type
Bug Report
Component Name
policypatset: policypatset_pattern_binding: binding_members
Python Version
Ansible Version
Ansible Configuration
$ ansible-config dump --only-changed
netscaler.adc Collection Version
Target NetScaler Version
Equivalent NetScaler CLI Command
https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/policy/policypatset_pattern_binding.html
Steps to Reproduce
Expected Results
Pattern binding addition to the existing policy added to the existing patterns.
Actual Results
Additioinal Notes
The policypatset module itself works sans the pattern binding, but I can't seem to get binding members to cooperate. I'm following what is shown here: https://netscaler.github.io/ansible-collection-netscaleradc/collections/netscaler/adc/policypatset_module.html
https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset/
https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset_pattern_binding/
Nothing I've tried is working out. I've scoured around looking for examples to be sure I'm using proper keys in the binding_members section, but aside from looking at the Nitro API output and what's in https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset_pattern_binding/, I haven't had much luck. Maybe the issue is very simple.
One note is I know my creds are lacking in write authorization, but the error is very different when I run into that with other netscaler.adc modules I've been messing with.
The text was updated successfully, but these errors were encountered: