From 64fc70433f9286bb48f0f364680f5faff11af9ae Mon Sep 17 00:00:00 2001 From: Mohamad Ghanem Date: Mon, 2 Dec 2024 11:55:39 +0100 Subject: [PATCH] add name_like to get config request --- plugins/modules/sentinelone_config_overrides.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/modules/sentinelone_config_overrides.py b/plugins/modules/sentinelone_config_overrides.py index a5a1bd9..0149b4c 100644 --- a/plugins/modules/sentinelone_config_overrides.py +++ b/plugins/modules/sentinelone_config_overrides.py @@ -6,6 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type + DOCUMENTATION = ''' --- module: sentinelone_config_overrides @@ -172,7 +173,7 @@ from ansible_collections.sva.sentinelone.plugins.module_utils.sentinelone.sentinelone_base import SentineloneBase, lib_imp_errors from ansible.module_utils.six.moves.urllib.parse import quote_plus import copy - +#import urllib.parse class SentineloneConfigOverrides(SentineloneBase): def __init__(self, module: AnsibleModule): @@ -275,7 +276,9 @@ def get_current_config_override(self, module: AnsibleModule): else: query_options.append("versionOption=SPECIFIC") query_options.append(f"agentVersions={self.agent_version}") - + # Encode the parameters + encoded_params_name_like = quote_plus(self.config_override_name) + query_options.append(f"name__like={encoded_params_name_like}") query_uri = '&'.join(query_options) api_url = f"{self.api_endpoint_config_overrides}?{query_uri}" response = self.api_call(module, api_url, error_msg=error_msg)