Skip to content

Commit

Permalink
add name_like to get config request
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamad Ghanem authored and Mohamad Ghanem committed Dec 2, 2024
1 parent a595419 commit 64fc704
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/modules/sentinelone_config_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type


DOCUMENTATION = '''
---
module: sentinelone_config_overrides
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 64fc704

Please sign in to comment.