Fix fm alarm-list and fm alarm-summary
Fixed a typo for accessing a configuration resource.
Fixed a python3 script called by fmManager on initialization. It was
modifying a dictionary while parsing it using an iterator, which doesn't
guarantee all initial elements are visited. The fm database
event_suppression table was left in a bad state, thus alarm list and
alarm summary were empty.
Tests:
- build and deploy from iso
- tested with the fm_api_test.py provided in the repo
- tested some of the commands by raising a config out of date and
targeting the raised alarm
- fm alarm-list, alarm-delete, alarm-show, alarm-summary, event-list,
event-show, event-suppress-list, event-suppress, event-unsuppress,
event-unsuppress-all produce relevant output
Story: 2008454
Task: 42632
Depends-On: I2d0f4c2c85ea8057258d56632a102b2eac7db388
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: Ib3d5276c4a669a3f3f123470c31edf7a07751eaa
(cherry picked from commit c18a7865c6
)
This commit is contained in:
parent
c9857c8cf4
commit
6ad32bbfd0
|
@ -109,7 +109,7 @@ if not os.path.isfile(EVENT_TYPES_FILE):
|
|||
with open(EVENT_TYPES_FILE, 'r') as stream:
|
||||
event_types = yaml.load(stream)
|
||||
|
||||
for alarm_id in event_types:
|
||||
for alarm_id in list(event_types.keys()):
|
||||
if isinstance(alarm_id, float):
|
||||
# force 3 digits after the decimal point,
|
||||
# to include trailing zero's (ex.: 200.010)
|
||||
|
|
|
@ -59,7 +59,7 @@ def validate_limit(limit):
|
|||
if limit:
|
||||
return min(CONF.api.limit_max, limit) or CONF.api.limit_max
|
||||
else:
|
||||
return CONF.api_limit_max
|
||||
return CONF.api.limit_max
|
||||
|
||||
|
||||
def validate_sort_dir(sort_dir):
|
||||
|
|
Loading…
Reference in New Issue