Skip to content

Commit

Permalink
Add app_id to CreateSavedSearchesIngestV1
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Nov 20, 2023
1 parent 4f4e726 commit 15d6e45
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
```
- `_auth_object/_uber_interface.py`
- `_service_class/_service_class.py`
+ Added: `app_id` keyword added to _CreateSavedSearchesIngestV1_ operation.
- `foundry_logscale.py`
> Unit testing expanded to complete code coverage.
- `tests/test_foundry_logscale.py`

## Issues resolved
+ Fixed: _update_policy_container_ operation payload handler is missing the `policy_id`` key. Closes #1068.
+ Fixed: _update_policy_container_ operation payload handler is missing the `policy_id` key. Closes #1068.
- `_payload/_firewall.py`
> Expanded unit testing to complete code coverage.
- `tests/test_firewall_management.py`
Expand Down
14 changes: 9 additions & 5 deletions src/falconpy/foundry_logscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
For more information, please refer to <https://unlicense.org>
"""
from typing import Dict, Union
from ._util import force_default, process_service_request
from ._util import force_default, process_service_request, handle_single_argument
from ._payload import foundry_execute_search_payload, foundry_dynamic_search_payload
from ._service_class import ServiceClass
from ._endpoint._foundry_logscale import _foundry_logscale_endpoints as Endpoints
Expand Down Expand Up @@ -282,13 +282,15 @@ def execute(self: object,
params=parameters
)

def populate(self: object) -> Dict[str, Union[int, dict]]:
@force_default(defaults=["parameters"], default_types=["dict"])
def populate(self: object, *args, parameters: dict = None, **kwargs) -> Dict[str, Union[int, dict]]:
"""Populate a saved search.
Keyword arguments:
This method does not accept keyword arguments.
app_id -- Application ID. String.
This method does not accept arguments.
Arguments: When not specified, the first argument to this method is assumed to be 'app_id'.
All others are ignored.
Returns: dict object containing API response.
Expand All @@ -300,7 +302,9 @@ def populate(self: object) -> Dict[str, Union[int, dict]]:
return process_service_request(
calling_object=self,
endpoints=Endpoints,
operation_id="CreateSavedSearchesIngestV1"
operation_id="CreateSavedSearchesIngestV1",
keywords=kwargs,
params=handle_single_argument(args, parameters, "app_id")
)

@force_default(defaults=["parameters"], default_types=["dict"])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_foundry_logscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run_all_tests(self):
"CreateSavedSearchesDynamicExecuteV1" : falcon.execute_dynamic(end="10", start="1"),
"GetSavedSearchesExecuteV1" : falcon.get_search_results(job_id="12345"),
"CreateSavedSearchesExecuteV1" : falcon.execute(search_parameters={"something": "somethingElse"}, end="10", start="1"),
"CreateSavedSearchesIngestV1" : falcon.populate(),
"CreateSavedSearchesIngestV1" : falcon.populate(app_id="pommegranate"),
"GetSavedSearchesJobResultsDownloadV1" : falcon.download_results(job_id="12345", result_format="json"),
}
for key in tests:
Expand Down

0 comments on commit 15d6e45

Please sign in to comment.