AlgosecCreateTicket
Creates a new FireFlow change request.
- Type
- python
- Pack
- Algosec
Source
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def algosec_create_ticket():
resp = demisto.executeCommand("algosec-create-ticket", demisto.args())
if isError(resp[0]):
result = resp
else:
data = demisto.get(resp[0], "Contents.createTicketResponse")
if data:
data = data if isinstance(data, list) else [data]
for item in data:
for row in item:
if "#text" in item[row]:
item[row] = item[row]["#text"]
data = flattenTable(data)
result = {"ContentsFormat": formats["table"], "Type": entryTypes["note"], "Contents": data}
else:
result = "No results."
return_results(result)
def main(): # pragma: no cover
try:
algosec_create_ticket()
except Exception as e:
err_msg = f"Encountered an error while running the script: [{e}]"
return_error(err_msg, error=e)
if __name__ in ("__main__", "__builtin__", "builtins"):
main()
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.