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

[Bug]: responderglobal_responderpolicy_binding not idempotent and unable to delete #378

Open
fa-elepape opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels

Comments

@fa-elepape
Copy link

Summary

The responderglobal_responderpolicy_binding takes both args and filter parameters in order to properly manage elements.

GET requests take both args for the type and filter for the rest.
DELETE requests take only the args parameter.

As a side note, it appears the DELETE method doesn't care about the priority argument which leads to multiple bindings of the same policy at different priorities to all get deleted.

Issue Type

Bug Report

Component Name

responderglobal_responderpolicy_binding

Python Version

$ python --version
Python 3.9.18

Ansible Version

$ ansible --version
ansible [core 2.16.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/share/ansible/lib64/python3.11/site-packages/ansible
  ansible collection location = /etc/ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Sep  7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/local/share/ansible/bin/python3)
  jinja version = 3.1.3
  libyaml = True

Ansible Configuration

$ ansible-config dump --only-changed
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/etc/ansible/ansible.cfg) = cache
CONFIG_FILE() = /etc/ansible/ansible.cfg
INJECT_FACTS_AS_VARS(/etc/ansible/ansible.cfg) = False
USE_PERSISTENT_CONNECTIONS(/etc/ansible/ansible.cfg) = True

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
Collection    Version
------------- -------
netscaler.adc 2.5.0

Target NetScaler Version

> show ns version
NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)

Equivalent NetScaler CLI Command

> unbind responder global test-responder-policy

Steps to Reproduce

---
- name: netscaler.adc.responderglobal_responderpolicy_binding bug report
  hosts: localhost
  gather_facts: false
  ignore_errors: true

  tasks:
  - netscaler.adc.responderpolicy:
      action: NOOP
      name: test-responder-policy
      rule: "false"
  - netscaler.adc.responderglobal_responderpolicy_binding:
      policyname: test-responder-policy
      type: REQ_OVERRIDE
      priority: 250
  - netscaler.adc.responderglobal_responderpolicy_binding:
      policyname: test-responder-policy
      type: REQ_OVERRIDE
      priority: 250
  - netscaler.adc.responderglobal_responderpolicy_binding:
      state: absent
      policyname: test-responder-policy
      type: REQ_OVERRIDE
  - ansible.builtin.uri:
      headers:
        X-NITRO-USER: '{{ lookup("ansible.builtin.env", "NETSCALER_NITRO_USER") }}'
        X-NITRO-PASS: '{{ lookup("ansible.builtin.env", "NETSCALER_NITRO_PASS") }}'
      method: '{{ item.method }}'
      return_content: true
      url: '{{ lookup("ansible.builtin.env", "NETSCALER_NITRO_PROTOCOL", default="https") }}://{{ lookup("ansible.builtin.env", "NETSCALER_NSIP") }}/nitro/v1/config/responderglobal_responderpolicy_binding?{{ item.params }}'
    loop:
    - method: GET
      params: 'args=type:REQ_OVERRIDE&filter=policyname:test-responder-policy,priority:250'
    - method: DELETE
      params: 'args=type:REQ_OVERRIDE,policyname:test-responder-policy,priority:250'
  - netscaler.adc.responderpolicy:
      action: NOOP
      name: test-responder-policy
      rule: "false"
      state: absent

Expected Results

The state: present should not report changes when there are none.
The state: absent should work.

Actual Results

> ansible-playbook --diff --verbose netscaler-testcase.yml
PLAY [netscaler.adc.responderglobal_responderpolicy_binding bug report] ********

TASK [netscaler.adc.responderpolicy] *******************************************
--- before
+++ after
@@ -1 +1,5 @@
-{}
+{
+    "action": "NOOP",
+    "name": "test-responder-policy",
+    "rule": "false"
+}

changed: [localhost] => {
  "changed": true,
  "loglines": [
    "DEBUG: Initializing ModuleExecutor for resource responderpolicy",
    "TRACE: ENTRY: common.get_valid_desired_states() called with ('responderpolicy',), {}",
    "TRACE: EXIT: common.get_valid_desired_states() returned {'present', 'absent', 'unset'}",
    "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'nsversion'), {}",
    "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/nsversion",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'GET', 'https://netscaler.example.com/nitro/v1/config/nsversion'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f2812eeae90>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/nsversion', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:22 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]), {}",
    "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]",
    "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}])",
    "TRACE: EXIT: common.get_netscaler_version() returned (13.0, 90.12)",
    "INFO: NetScaler version: 13.0-90.12",
    "DEBUG: All params (including non module-specific params) are: {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false', 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowaction': None, 'comment': None, 'logaction': None, 'newname': None, 'responderpolicylabel_responderpolicy_binding': None, 'undefaction': None}",
    "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "DEBUG: self.module.params: {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false', 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowaction': None, 'comment': None, 'logaction': None, 'newname': None, 'responderpolicylabel_responderpolicy_binding': None, 'undefaction': None}",
    "DEBUG: Desired `responderpolicy` module specific params are: {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}",
    "TRACE: EXIT: module_executor._filter_resource_module_params() returned None",
    "TRACE: ENTRY: module_executor._filter_desired_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "DEBUG: Desired `responderpolicy` module specific bindings are: {}",
    "TRACE: EXIT: module_executor._filter_desired_bindings() returned None",
    "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>,), {'resource_name': 'responderpolicy', 'resource_id': 'test-responder-policy', 'resource_module_params': {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}}",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>,), {'resource': 'responderpolicy', 'id': 'test-responder-policy', 'args': {}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'responderpolicy'), {'id': 'test-responder-policy', 'args': {}, 'attrs': None, 'filter': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderpolicy/test-responder-policy",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'GET', 'https://netscaler.example.com/nitro/v1/config/responderpolicy/test-responder-policy'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f2812eeae90>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/responderpolicy/test-responder-policy', 'status': 404, 'date': 'Thu, 07 Mar 2024 10:56:22 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '78', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'msg': 'HTTP Error 404: Not Found', 'body': b'{ \"errorcode\": 2054, \"message\": \"No such policy exists\", \"severity\": \"ERROR\" }'}",
    "TRACE: EXIT: client.send() returned (404, {'errorcode': 2054, 'message': 'No such policy exists', 'severity': 'ERROR'})",
    "TRACE: EXIT: client.get() returned (404, {'errorcode': 2054, 'message': 'No such policy exists', 'severity': 'ERROR'})",
    "TRACE: EXIT: common.get_resource() returned (False, [])",
    "TRACE: EXIT: module_executor.get_existing_resource() returned {}",
    "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "TRACE: ENTRY: module_executor.create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {'existing': {}, 'desired': {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}}",
    "TRACE: EXIT: module_executor.update_diff_list() returned None",
    "INFO: Resource responderpolicy:test-responder-policy does not exist. Will be CREATED.",
    "TRACE: ENTRY: common.create_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'responderpolicy', {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}), {}",
    "TRACE: ENTRY: common._check_create_resource_params() called with ('responderpolicy', {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}), {}",
    "TRACE: EXIT: common._check_create_resource_params() returned (True, None, {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'})",
    "TRACE: ENTRY: client.post() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>,), {'post_data': {'responderpolicy': {'action': 'NOOP', 'name': 'test-responder-policy', 'rule': 'false'}}, 'resource': 'responderpolicy', 'action': None}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'responderpolicy'), {'action': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderpolicy",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f2812eebc50>, 'POST', 'https://netscaler.example.com/nitro/v1/config/responderpolicy', '{\"responderpolicy\": {\"action\": \"NOOP\", \"name\": \"test-responder-policy\", \"rule\": \"false\"}}'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f2812eeae90>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= POST: {'url': 'https://netscaler.example.com/nitro/v1/config/responderpolicy', 'status': 201, 'date': 'Thu, 07 Mar 2024 10:56:23 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '0', 'content-type': 'text/html; charset=UTF-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (0 bytes)'}",
    "TRACE: EXIT: client.send() returned (201, {})",
    "TRACE: EXIT: client.post() returned (201, {})",
    "TRACE: ENTRY: common.return_response() called with (), {'status_code': 201, 'response_body': {}, 'operation': 'create_resource', 'resource_name': 'responderpolicy'}",
    "DEBUG: create_resource responderpolicy SUCCESS",
    "TRACE: EXIT: common.return_response() returned (True, {})",
    "TRACE: EXIT: common.create_resource() returned (True, {})",
    "TRACE: EXIT: module_executor.create_or_update() returned None",
    "TRACE: ENTRY: module_executor.sync_all_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}",
    "TRACE: EXIT: module_executor.sync_all_bindings() returned None",
    "TRACE: ENTRY: module_executor.return_success() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f28146b4c90>,), {}"
  ]
}

TASK [netscaler.adc.responderglobal_responderpolicy_binding] *******************
--- before
+++ after
@@ -1 +1,5 @@
-{}
+{
+    "policyname": "test-responder-policy",
+    "priority": 250.0,
+    "type": "REQ_OVERRIDE"
+}

changed: [localhost] => {
  "changed": true,
  "loglines": [
    "DEBUG: Initializing ModuleExecutor for resource responderglobal_responderpolicy_binding",
    "TRACE: ENTRY: common.get_valid_desired_states() called with ('responderglobal_responderpolicy_binding',), {}",
    "TRACE: EXIT: common.get_valid_desired_states() returned {'absent', 'present'}",
    "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'nsversion'), {}",
    "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/nsversion",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'GET', 'https://netscaler.example.com/nitro/v1/config/nsversion'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb04dd16ed0>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/nsversion', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:25 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]), {}",
    "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]",
    "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}])",
    "TRACE: EXIT: common.get_netscaler_version() returned (13.0, 90.12)",
    "INFO: NetScaler version: 13.0-90.12",
    "DEBUG: All params (including non module-specific params) are: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0, 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None}",
    "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {}",
    "DEBUG: self.module.params: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0, 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None}",
    "DEBUG: Desired `responderglobal_responderpolicy_binding` module specific params are: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}",
    "TRACE: EXIT: module_executor._filter_resource_module_params() returned None",
    "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>,), {'resource_name': 'responderglobal_responderpolicy_binding', 'resource_id': '', 'resource_module_params': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>,), {'resource': 'responderglobal_responderpolicy_binding', 'id': '', 'filter': {'policyname': 'test-responder-policy', 'priority': 250.0, 'type': 'REQ_OVERRIDE'}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'responderglobal_responderpolicy_binding'), {'id': '', 'args': None, 'attrs': None, 'filter': {'policyname': 'test-responder-policy', 'priority': 250.0, 'type': 'REQ_OVERRIDE'}}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'GET', 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb04dd16ed0>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:25 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '57', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (57 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: common.get_resource() returned (False, [])",
    "TRACE: EXIT: module_executor.get_existing_resource() returned {}",
    "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {}",
    "TRACE: ENTRY: module_executor.create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {}",
    "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {'existing': {}, 'desired': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}",
    "TRACE: EXIT: module_executor.update_diff_list() returned None",
    "INFO: Resource responderglobal_responderpolicy_binding: does not exist. Will be CREATED.",
    "TRACE: ENTRY: common.create_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'responderglobal_responderpolicy_binding', {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}), {}",
    "TRACE: ENTRY: common._check_create_resource_params() called with ('responderglobal_responderpolicy_binding', {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}), {}",
    "TRACE: EXIT: common._check_create_resource_params() returned (True, None, {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0})",
    "TRACE: ENTRY: client.post() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>,), {'post_data': {'responderglobal_responderpolicy_binding': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}, 'resource': 'responderglobal_responderpolicy_binding', 'action': None}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'responderglobal_responderpolicy_binding'), {'action': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb04dd17c50>, 'POST', 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding', '{\"responderglobal_responderpolicy_binding\": {\"policyname\": \"test-responder-policy\", \"type\": \"REQ_OVERRIDE\", \"priority\": 250.0}}'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb04dd16ed0>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= POST: {'url': 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding', 'status': 201, 'date': 'Thu, 07 Mar 2024 10:56:26 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '0', 'content-type': 'text/html; charset=UTF-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (0 bytes)'}",
    "TRACE: EXIT: client.send() returned (201, {})",
    "TRACE: EXIT: client.post() returned (201, {})",
    "TRACE: ENTRY: common.return_response() called with (), {'status_code': 201, 'response_body': {}, 'operation': 'create_resource', 'resource_name': 'responderglobal_responderpolicy_binding'}",
    "DEBUG: create_resource responderglobal_responderpolicy_binding SUCCESS",
    "TRACE: EXIT: common.return_response() returned (True, {})",
    "TRACE: EXIT: common.create_resource() returned (True, {})",
    "TRACE: EXIT: module_executor.create_or_update() returned None",
    "TRACE: ENTRY: module_executor.return_success() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb04f344890>,), {}"
  ]
}

TASK [netscaler.adc.responderglobal_responderpolicy_binding] *******************
--- before
+++ after
@@ -1 +1,5 @@
-{}
+{
+    "policyname": "test-responder-policy",
+    "priority": 250.0,
+    "type": "REQ_OVERRIDE"
+}

changed: [localhost] => {
  "changed": true,
  "loglines": [
    "DEBUG: Initializing ModuleExecutor for resource responderglobal_responderpolicy_binding",
    "TRACE: ENTRY: common.get_valid_desired_states() called with ('responderglobal_responderpolicy_binding',), {}",
    "TRACE: EXIT: common.get_valid_desired_states() returned {'absent', 'present'}",
    "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'nsversion'), {}",
    "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/nsversion",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'GET', 'https://netscaler.example.com/nitro/v1/config/nsversion'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb1cd9fb590>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/nsversion', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:27 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]), {}",
    "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]",
    "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}])",
    "TRACE: EXIT: common.get_netscaler_version() returned (13.0, 90.12)",
    "INFO: NetScaler version: 13.0-90.12",
    "DEBUG: All params (including non module-specific params) are: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0, 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None}",
    "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {}",
    "DEBUG: self.module.params: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0, 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None}",
    "DEBUG: Desired `responderglobal_responderpolicy_binding` module specific params are: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}",
    "TRACE: EXIT: module_executor._filter_resource_module_params() returned None",
    "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>,), {'resource_name': 'responderglobal_responderpolicy_binding', 'resource_id': '', 'resource_module_params': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>,), {'resource': 'responderglobal_responderpolicy_binding', 'id': '', 'filter': {'policyname': 'test-responder-policy', 'priority': 250.0, 'type': 'REQ_OVERRIDE'}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'responderglobal_responderpolicy_binding'), {'id': '', 'args': None, 'attrs': None, 'filter': {'policyname': 'test-responder-policy', 'priority': 250.0, 'type': 'REQ_OVERRIDE'}}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'GET', 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb1cd9fb590>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,priority:250.0,type:REQ_OVERRIDE', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:28 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '57', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (57 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: common.get_resource() returned (False, [])",
    "TRACE: EXIT: module_executor.get_existing_resource() returned {}",
    "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {}",
    "TRACE: ENTRY: module_executor.create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {}",
    "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {'existing': {}, 'desired': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}",
    "TRACE: EXIT: module_executor.update_diff_list() returned None",
    "INFO: Resource responderglobal_responderpolicy_binding: does not exist. Will be CREATED.",
    "TRACE: ENTRY: common.create_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'responderglobal_responderpolicy_binding', {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}), {}",
    "TRACE: ENTRY: common._check_create_resource_params() called with ('responderglobal_responderpolicy_binding', {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}), {}",
    "TRACE: EXIT: common._check_create_resource_params() returned (True, None, {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0})",
    "TRACE: ENTRY: client.post() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>,), {'post_data': {'responderglobal_responderpolicy_binding': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'priority': 250.0}}, 'resource': 'responderglobal_responderpolicy_binding', 'action': None}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'responderglobal_responderpolicy_binding'), {'action': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7fb1cd808310>, 'POST', 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding', '{\"responderglobal_responderpolicy_binding\": {\"policyname\": \"test-responder-policy\", \"type\": \"REQ_OVERRIDE\", \"priority\": 250.0}}'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7fb1cd9fb590>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= POST: {'url': 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding', 'status': 201, 'date': 'Thu, 07 Mar 2024 10:56:28 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '0', 'content-type': 'text/html; charset=UTF-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (0 bytes)'}",
    "TRACE: EXIT: client.send() returned (201, {})",
    "TRACE: EXIT: client.post() returned (201, {})",
    "TRACE: ENTRY: common.return_response() called with (), {'status_code': 201, 'response_body': {}, 'operation': 'create_resource', 'resource_name': 'responderglobal_responderpolicy_binding'}",
    "DEBUG: create_resource responderglobal_responderpolicy_binding SUCCESS",
    "TRACE: EXIT: common.return_response() returned (True, {})",
    "TRACE: EXIT: common.create_resource() returned (True, {})",
    "TRACE: EXIT: module_executor.create_or_update() returned None",
    "TRACE: ENTRY: module_executor.return_success() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7fb1cf1b5b10>,), {}"
  ]
}

TASK [netscaler.adc.responderglobal_responderpolicy_binding] *******************
ok: [localhost] => {
  "changed": false,
  "loglines": [
    "DEBUG: Initializing ModuleExecutor for resource responderglobal_responderpolicy_binding",
    "TRACE: ENTRY: common.get_valid_desired_states() called with ('responderglobal_responderpolicy_binding',), {}",
    "TRACE: EXIT: common.get_valid_desired_states() returned {'present', 'absent'}",
    "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>, 'nsversion'), {}",
    "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/nsversion",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>, 'GET', 'https://netscaler.example.com/nitro/v1/config/nsversion'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f1636caeed0>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/nsversion', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:29 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}})",
    "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]), {}",
    "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}]",
    "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)', 'mode': '1'}])",
    "TRACE: EXIT: common.get_netscaler_version() returned (13.0, 90.12)",
    "INFO: NetScaler version: 13.0-90.12",
    "DEBUG: All params (including non module-specific params) are: {'state': 'absent', 'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None, 'priority': None}",
    "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>,), {}",
    "DEBUG: self.module.params: {'state': 'absent', 'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE', 'nsip': 'netscaler.example.com', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None, 'globalbindtype': None, 'gotopriorityexpression': None, 'invoke': None, 'labelname': None, 'labeltype': None, 'priority': None}",
    "DEBUG: Desired `responderglobal_responderpolicy_binding` module specific params are: {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE'}",
    "TRACE: EXIT: module_executor._filter_resource_module_params() returned None",
    "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>,), {}",
    "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>,), {'resource_name': 'responderglobal_responderpolicy_binding', 'resource_id': '', 'resource_module_params': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE'}}",
    "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>,), {'resource': 'responderglobal_responderpolicy_binding', 'id': '', 'filter': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE'}}",
    "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>, 'responderglobal_responderpolicy_binding'), {'id': '', 'args': None, 'attrs': None, 'filter': {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE'}}",
    "TRACE: EXIT: client.url_builder() returned https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,type:REQ_OVERRIDE",
    "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f1636cafc90>, 'GET', 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,type:REQ_OVERRIDE'), {}",
    "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f1636caeed0>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
    "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?filter=policyname:test-responder-policy,type:REQ_OVERRIDE', 'status': 200, 'date': 'Thu, 07 Mar 2024 10:56:30 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '57', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (57 bytes)'}",
    "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
    "TRACE: EXIT: common.get_resource() returned (False, [])",
    "TRACE: EXIT: module_executor.get_existing_resource() returned {}",
    "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>,), {}",
    "TRACE: ENTRY: common.is_global_binding() called with ('responderglobal_responderpolicy_binding',), {}",
    "TRACE: EXIT: common.is_global_binding() returned True",
    "TRACE: ENTRY: module_executor.delete() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>,), {}",
    "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>, {}, {'policyname': 'test-responder-policy', 'type': 'REQ_OVERRIDE'}), {'delete': True}",
    "TRACE: EXIT: module_executor.update_diff_list() returned None",
    "TRACE: EXIT: module_executor.delete() returned None",
    "TRACE: ENTRY: module_executor.return_success() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f163847c250>,), {}"
  ]
}

TASK [ansible.builtin.uri] *****************************************************
ok: [localhost] => (item={'method': 'GET', 'params': 'args=type:REQ_OVERRIDE&filter=policyname:test-responder-policy,priority:250'}) => {
  "item": {
    "method": "GET",
    "params": "args=type:REQ_OVERRIDE&filter=policyname:test-responder-policy,priority:250"
  },
  "json": {
    "errorcode": 0,
    "message": "Done",
    "responderglobal_responderpolicy_binding": [
      {
        "flags": "0",
        "flowtype": "1",
        "globalbindtype": "SYSTEM_GLOBAL",
        "gotopriorityexpression": "END",
        "invoke": false,
        "numpol": "3",
        "policyname": "test-responder-policy",
        "priority": "250",
        "stateflag": "0",
        "type": "REQ_OVERRIDE"
      }
    ],
    "severity": "NONE"
  },
  "status": 200,
  "url": "https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?args=type:REQ_OVERRIDE&filter=policyname:test-responder-policy,priority:250"
}
ok: [localhost] => (item={'method': 'DELETE', 'params': 'args=type:REQ_OVERRIDE,policyname:test-responder-policy,priority:250'}) => {
  "item": {
    "method": "DELETE",
    "params": "args=type:REQ_OVERRIDE,policyname:test-responder-policy,priority:250"
  },
  "json": {
    "errorcode": 0,
    "message": "Done",
    "severity": "NONE"
  },
  "status": 200,
  "url": "https://netscaler.example.com/nitro/v1/config/responderglobal_responderpolicy_binding?args=type:REQ_OVERRIDE,policyname:test-responder-policy,priority:250"
}

TASK [netscaler.adc.responderpolicy] *******************************************
--- before
+++ after
@@ -1,5 +1 @@
-{
-    "action": "NOOP",
-    "name": "test-responder-policy",
-    "rule": "false"
-}
+{}

changed: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=6    changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Additioinal Notes

While the parameters deviate from the general case of the _binding resource, it appears to be properly documented in the NITRO API documentation.

@fa-elepape
Copy link
Author

For now I've applied a quick workaround using this patch:

--- plugins/module_utils/common.py      2024-02-22 12:02:42.000000000 +0530
+++ plugins/module_utils/common.py      2024-02-22 12:02:42.000000000 +0530
@@ -59,7 +59,14 @@
             get_args["cipheraliasname"] = get_args["ciphername"]
             del get_args["ciphername"]

-    if resource_name.endswith("_binding"):
+    if resource_name in {'responderglobal_responderpolicy_binding'}:
+        status_code, response_body = client.get(
+            resource=resource_name,
+            id=resource_id,
+            args={'type': get_args.pop('type')},
+            filter=get_args,
+        )
+    elif resource_name.endswith("_binding"):
         # binding resources require `filter` instead of `args` to uniquely identify a resource
         status_code, response_body = client.get(
             resource=resource_name,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants