Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from soar_sdk.SiemplifyUtils import output_handler
from soar_sdk.SiemplifyAction import SiemplifyAction
from ..core.MicroFocusITSMAManager import MicroFocusITSMAManager


ITSMA_PROVIDER = "MicroFocusITSMA"


@output_handler
def main():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The main function is missing a return type annotation, which is required by the style guide (line 80). Please add -> None. This applies to the main function in other actions as well (Ping.py, UpdateIncident.py, UpdateIncidentExternalStatus.py).

Suggested change
def main():
def main() -> None:
References
  1. All function parameters and return types must be annotated. (link)

# Configuration
siemplify = SiemplifyAction()
conf = siemplify.get_configuration(ITSMA_PROVIDER)
itsma_manager = MicroFocusITSMAManager(
conf["API Root"],
conf["Username"],
conf["Password"],
conf["Tenant ID"],
conf["External System"],
conf["External ID"],
conf["Verify SSL"],
)

# Parameters.
display_label = siemplify.parameters.get("Display Label")
description = siemplify.parameters.get("Description")
impact_scope = siemplify.parameters.get("Impact Scope")
urgency = siemplify.parameters.get("Urgency")
service_id = siemplify.parameters.get("Service ID")

incident_id = itsma_manager.create_incident(
display_label, description, impact_scope, urgency, service_id
)

if incident_id:
output_message = (
f'An incident with id "{incident_id}" was successfully created.'
)
else:
output_message = "No ticket was created."

siemplify.end(output_message, incident_id)


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Create Incident
description: Create a new incident
documentation_link: https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/micro-focus-itsma#create_incident
integration_identifier: MicroFocusITSMA
parameters:
- name: Display Label
type: string
description: The display label of the incident
is_mandatory: true
- name: Description
type: string
description: The description of the incident
is_mandatory: true
- name: Impact Scope
type: string
description: The impact scope of the incident
is_mandatory: true
- name: Urgency
type: string
description: The urgency of the incident
is_mandatory: true
- name: Service ID
type: string
description: The id of the category of the incident
is_mandatory: true
dynamic_results_metadata: []
creator: admin
script_result_name: incident_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from soar_sdk.SiemplifyUtils import output_handler
from soar_sdk.SiemplifyAction import SiemplifyAction
from ..core.MicroFocusITSMAManager import MicroFocusITSMAManager

ITSMA_PROVIDER = "MicroFocusITSMA"


@output_handler
def main():
# Configuration
siemplify = SiemplifyAction()
conf = siemplify.get_configuration(ITSMA_PROVIDER)
itsma_manager = MicroFocusITSMAManager(
conf["API Root"],
conf["Username"],
conf["Password"],
conf["Tenant ID"],
conf["External System"],
conf["External ID"],
conf["Verify SSL"],
)

result_value = itsma_manager.get_token()

if result_value:
output_message = "Connection Established."
else:
output_message = "Connection Failed."

siemplify.end(output_message, result_value)


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Ping
description: Test Connectivity
documentation_link: https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/micro-focus-itsma#ping
integration_identifier: MicroFocusITSMA
parameters: []
dynamic_results_metadata: []
creator: admin
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from soar_sdk.SiemplifyUtils import output_handler
from soar_sdk.SiemplifyAction import SiemplifyAction
from ..core.MicroFocusITSMAManager import MicroFocusITSMAManager


ITSMA_PROVIDER = "MicroFocusITSMA"


@output_handler
def main():
# Configuration
siemplify = SiemplifyAction()
conf = siemplify.get_configuration(ITSMA_PROVIDER)
itsma_manager = MicroFocusITSMAManager(
conf["API Root"],
conf["Username"],
conf["Password"],
conf["Tenant ID"],
conf["External System"],
conf["External ID"],
conf["Verify SSL"],
)

# Parameters.
incident_id = siemplify.parameters.get("Incident ID")
display_label = siemplify.parameters.get("Display Label")
description = siemplify.parameters.get("Description")
impact_scope = siemplify.parameters.get("Impact Scope")
urgency = siemplify.parameters.get("Urgency")
service_id = siemplify.parameters.get("Service ID")

result_value = itsma_manager.update_incident(
incident_id,
display_label,
description,
impact_scope,
urgency,
service_id
)

if result_value:
updated_params = [
param
for param, value in siemplify.parameters.items()
if value and key is not "Incident ID"
]
Comment on lines +57 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

There is a NameError in this list comprehension because key is not defined. It seems you intended to use param. Also, using is not for string comparison is not reliable and should be replaced with !=.

Suggested change
updated_params = [
param
for param, value in siemplify.parameters.items()
if value and key is not "Incident ID"
]
updated_params = [
param
for param, value in siemplify.parameters.items()
if value and param != "Incident ID"
]


output_message = f'An incident with id "{incident_id}" was successfully updated. \n Updated parameters: {",".join(updated_params)}'
else:
output_message = "No ticket was updated."

siemplify.end(output_message, result_value)


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Update Incident
description: Update an existing incident
documentation_link: https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/micro-focus-itsma#update_incident
integration_identifier: MicroFocusITSMA
parameters:
- name: Incident ID
type: string
description: The ID of the incident
is_mandatory: true
- name: Display Label
type: string
description: The updated display label of the incident
is_mandatory: false
- name: Description
type: string
description: The updated description of the incident
is_mandatory: false
- name: Impact Scope
type: string
description: The updated impact score of the incident
is_mandatory: false
- name: Urgency
type: string
description: The updated urgency of the incident
is_mandatory: false
- name: Service ID
type: string
description: The updated Id of the category of the incident
is_mandatory: false
dynamic_results_metadata: []
creator: admin
script_result_name: is_succeed
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from soar_sdk.SiemplifyUtils import output_handler
from soar_sdk.SiemplifyAction import SiemplifyAction
from ..core.MicroFocusITSMAManager import MicroFocusITSMAManager


ITSMA_PROVIDER = "MicroFocusITSMA"


@output_handler
def main():
# Configuration
siemplify = SiemplifyAction()
conf = siemplify.get_configuration(ITSMA_PROVIDER)
itsma_manager = MicroFocusITSMAManager(
conf["API Root"],
conf["Username"],
conf["Password"],
conf["Tenant ID"],
conf["External System"],
conf["External ID"],
conf["Verify SSL"],
)

# Parameters.
incident_id = siemplify.parameters.get("Incident ID")
status = siemplify.parameters.get("Status")

result_value = itsma_manager.update_external_incident_status(
incident_id,
status
)

if result_value:
output_message = f'An incident with id "{incident_id}" external status was change to {status}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a typo in the output message. "change" should be "changed".

Suggested change
output_message = f'An incident with id "{incident_id}" external status was change to {status}'
output_message = f'An incident with id "{incident_id}" external status was changed to {status}'

else:
output_message = "No ticket was updated."

siemplify.end(output_message, result_value)


if __name__ == "__main__":
main()
Loading
Loading