Skip to content

Commit 20f0816

Browse files
fix: 🐛 Fix syntax typos in ecos _alarm submodule
1 parent 3b480b5 commit 20f0816

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

pyedgeconnect/ecos/_alarm.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_appliance_alarms(
4242
* keyword **num_tunnel_outstanding** (`int`): Number of
4343
tunnel alarms outstanding
4444
* keyword **num_warning** (`int`): Number of warning alarms
45-
* keyword **outstanding* (`list[dict]`): Outstanding alarms \n
45+
* keyword **outstanding** (`list[dict]`): Outstanding alarms \n
4646
* [`dict`]: Outstanding Alarm detail object \n
4747
* keyword **severity** (`int`): Alarm severity,
4848
``0`` translates to ``Info``,
@@ -164,7 +164,7 @@ def clear_appliance_alarms(
164164

165165
def get_appliance_alarm_descriptions(
166166
self,
167-
format: str,
167+
response_format: str = None,
168168
) -> list:
169169
"""Get Orchestrator alarm descriptions
170170
@@ -177,9 +177,11 @@ def get_appliance_alarm_descriptions(
177177
* - alarm
178178
- GET
179179
- /alarm/description2
180-
:param format: Specify to ``csv`` to download CSV format, otherwise
181-
will return information in list of dictionaries of JSON format
182-
:type format: str
180+
181+
:param response_format: Specify to ``csv`` to download CSV format,
182+
otherwise will return information in list of dictionaries of
183+
JSON format, defaults to None
184+
:type response_format: str, optional
183185
:return: Returns list of alarm descriptions and details \n
184186
* [`dict`]: List of alarm description dictionaries \n
185187
* keyword **typeId** (`int`): Alarm type id
@@ -201,7 +203,12 @@ def get_appliance_alarm_descriptions(
201203
alarm is clearable
202204
:rtype: dict
203205
"""
204-
return self._get("/alarm/description2")
206+
path = "/alarm/description2"
207+
208+
if response_format is not None:
209+
path += f"?format={response_format}"
210+
211+
return self._get(path)
205212

206213

207214
def add_note_appliance_alarms(

0 commit comments

Comments
 (0)