Go to file
Victor Romano 0d36c58f6a Add new methods/options to FM API
This commit does the following:

- Add a new option "keep_existing_alarm" when creating an alarm so,
if said alarm already exists, it won't be updated.

- Add a new method to clear alarms from a list. The input is a list
with each element being a tuple consisted of alarm_id and
entity_instance_id.

- Modified the existing method that created alarms from a list.
Previously, the client would loop through the list of alarms and send
requests to FM API. Now, alarms from the list are converted into
a vector of structs and passed to FM API in a single request.

Test plan (using FaultAPIsV2):
  - PASS: Build package and install.
  - PASS: Create a new alarm with keep_existing_alarm=True and verify
          a new alarm was created.
  - PASS: Create an existing alarm with keep_existing_alarm=True and
          verify the original alarm was kept and the returned UUID
          is correct.
  - PASS: Create an existing alarm without keep_existing_alarm and
          verify the original alarm was updated and the returned UUID
          is correct.
  - PASS: Create a list of alarms and verify they were correctly
          created and it was faster than previous method.
  - PASS: Clear a list of alarms that exist and verify they were
          successfully cleared.
  - PASS: Clear a list of alarms that don't exist and verify the API
          didn't raise any errors.
  - PASS: Stop pmond process and verify mtce raises the correct
          200.006 alarm only once. Restart pmond and verify the alarm
          is cleared.

Story: 2011311
Task: 52166

Change-Id: I2f901c4726c24f3522a8c5bae1d7d9b03ef24ce0
Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>
2025-06-16 09:25:01 -03:00
2023-08-29 17:33:47 -03:00
2025-06-16 09:25:01 -03:00
2019-04-19 19:52:34 +00:00
2025-01-16 01:00:27 +00:00
2021-09-01 08:58:34 -04:00
2018-05-31 07:36:00 -07:00
2023-05-31 16:36:27 +00:00
2023-07-19 10:48:29 -03:00
2023-03-02 19:32:25 +00:00

Fault Management (FM)

The starlingx/fault repository handles Fault Management (FM) services1, and provides the fm command-line interface (CLI)2.

This repository is not intended to be developed standalone, but rather as part of the StarlingX Source System, which is defined by the StarlingX manifest3.

References


  1. https://docs.starlingx.io/api-ref/fault↩︎

  2. https://docs.starlingx.io/cli_ref/fm.html↩︎

  3. https://opendev.org/starlingx/manifest.git↩︎

Description
StarlingX Fault Management
Readme 6.1 MiB
Languages
Python 60.8%
C++ 33.4%
Shell 3%
C 1.6%
Makefile 1.1%