Details
| ID | AlgosecCreateTicket |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | Algosec |
README
Creates a new FireFlow change request.
Script Data
| Name | Description |
|---|---|
| Script Type | python |
| Tags | Algosec |
Dependencies
This script uses the following commands and scripts.
- algosec-create-ticket
Inputs
| Argument Name | Description |
|---|---|
| description | The free text description of the issue. |
| devices | The list of device names, on which the change should be made. |
| action | The device action to perform for the traffic. Can be, “1” which will allow the traffic, or “0” which will block the traffic. |
| destAddress | The destination address to perform the action on. |
| sourceAddress | The source address to perform the action on. |
| requestor | The email address of the requestor. |
| subject | The change request’s title. |
| service | The device service or port for the connection, for example, “http” or “tcp/123”. |
| user | The user for the connection. |
| application | The application for the connection. |
Outputs
There are no outputs for this script.
import demistomock as demisto def test_algosec_create_ticket(mocker): """ Given: - response mock. When: - running AlgosecCreateTicket script. Then: - Ensure that the results were built correctly. """ from AlgosecCreateTicket import algosec_create_ticket ticket = [{"Type": 3, "Contents": {"createTicketResponse": {"some_info": {"info": "test"}}}}] mocker.patch.object(demisto, "executeCommand", return_value=ticket) results_mock = mocker.patch.object(demisto, "results") algosec_create_ticket() assert results_mock.call_args[0][0]["Contents"] == [{"some_info": "info: test"}]