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

Netscaler_nitro_request filter only parses the first argument #48

Closed
JonasVerhofste opened this issue Jun 4, 2020 · 0 comments
Closed

Comments

@JonasVerhofste
Copy link
Contributor

JonasVerhofste commented Jun 4, 2020

SUMMARY

netscaler_nitro_request has a parameter filter, that accepts a dict of filter options.
However, the code only ever parses the first element, whilst it should combine them with an & instead.

Will try and make a PR later on, should be quite a trivial fix.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

netscaler_nitro_api

ANSIBLE VERSION

2.9.9

STEPS TO REPRODUCE

Make a netscaler_nitro_request with operation get_filtered

- name: Do some filter
  netscaler_nitro_request:
    nsip: mynetscaler.mydomain.mytld
    nitro_user: myuser
    nitro_pass: mypass
    nitro_protocol: https
    operation: get_filtered
    resource: sslcertkey
    filter:
      certificatetype: "{{ '/ROOT_CERT|INTM_CERT/' | urlencode | replace('/', '%2F') }}"
      subject: "{{ '/COMODO/' | replace('/', '%2F') }}"

That urlencode would also make more sense to be done in python, rather than in yaml..

EXPECTED RESULTS

The request that is sent to netscaler contains all filters. In case of the above:
https://mynetscaler.mydomain.mytld/nitro/v1/config/sslcertkey?filter=certificatetype:%2FROOT_CERT%7CINTM_CERT%2F,subject:%2FCOMODO%2F

ACTUAL RESULTS

The request only contains the first filter from the dict:
https://mynetscaler.mydomain.mytld/nitro/v1/config/sslcertkey?filter=certificatetype:%2FROOT_CERT%7CINTM_CERT%2F

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

1 participant