Skip to content

Commit c724b6b

Browse files
committed
update OAS
1 parent 80d6e0d commit c724b6b

11 files changed

Lines changed: 48 additions & 32 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "mist_openapi"]
22
path = mist_openapi
33
url = https://github.com/mistsys/mist_openapi.git
4-
branch = switch_routing_policies_fix
4+
branch = master

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mistapi"
7-
version = "0.59.4"
7+
version = "0.59.5"
88
authors = [{ name = "Thomas Munzer", email = "tmunzer@juniper.net" }]
99
description = "Python package to simplify the Mist System APIs usage"
1010
keywords = ["Mist", "Juniper", "API"]

src/mistapi/__version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.59.4"
1+
__version__ = "0.59.5"
22
__author__ = "Thomas Munzer <tmunzer@juniper.net>"

src/mistapi/api/v1/orgs/alarms.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ def searchOrgAlarms(
131131
mist_session: _APISession,
132132
org_id: str,
133133
site_id: str | None = None,
134+
group: str | None = None,
135+
severity: str | None = None,
134136
type: str | None = None,
135-
status: str | None = None,
137+
ack_admin_name: str | None = None,
138+
acked: bool | None = None,
136139
start: str | None = None,
137140
end: str | None = None,
138141
duration: str | None = None,
@@ -155,8 +158,13 @@ def searchOrgAlarms(
155158
QUERY PARAMS
156159
------------
157160
site_id : str
161+
group : str{'infrastructure', 'marvis', 'security'}
162+
Alarm group. enum: `infrastructure`, `marvis`, `security`
163+
severity : str{'critical', 'info', 'warn'}
164+
Severity of the alarm. enum: `critical`, `info`, `warn`
158165
type : str
159-
status : str
166+
ack_admin_name : str
167+
acked : bool
160168
start : str
161169
end : str
162170
duration : str, default: 1d
@@ -174,10 +182,16 @@ def searchOrgAlarms(
174182
query_params: dict[str, str] = {}
175183
if site_id:
176184
query_params["site_id"] = str(site_id)
185+
if group:
186+
query_params["group"] = str(group)
187+
if severity:
188+
query_params["severity"] = str(severity)
177189
if type:
178190
query_params["type"] = str(type)
179-
if status:
180-
query_params["status"] = str(status)
191+
if ack_admin_name:
192+
query_params["ack_admin_name"] = str(ack_admin_name)
193+
if acked:
194+
query_params["acked"] = str(acked)
181195
if start:
182196
query_params["start"] = str(start)
183197
if end:

src/mistapi/api/v1/orgs/stats.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,11 +795,11 @@ def countOrgSwOrGwPorts(
795795
rx_mcast_pkts : int
796796
rx_bcast_pkts : int
797797
speed : int
798-
stp_state : str{'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
798+
stp_state : str{'', 'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
799799
If `up`==`true`
800-
stp_role : str{'alternate', 'backup', 'designated', 'root', 'root-prevented'}
800+
stp_role : str{'', 'alternate', 'backup', 'designated', 'disabled', 'root', 'root-prevented'}
801801
If `up`==`true`
802-
auth_state : str{'authenticated', 'authenticating', 'held', 'init'}
802+
auth_state : str{'', 'authenticated', 'authenticating', 'held', 'init'}
803803
If `up`==`true` && has Authenticator role
804804
up : bool
805805
site_id : str
@@ -970,11 +970,11 @@ def searchOrgSwOrGwPorts(
970970
mac_limit : int
971971
mac_count : int
972972
up : bool
973-
stp_state : str{'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
973+
stp_state : str{'', 'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
974974
If `up`==`true`
975-
stp_role : str{'alternate', 'backup', 'designated', 'root', 'root-prevented'}
975+
stp_role : str{'', 'alternate', 'backup', 'designated', 'disabled', 'root', 'root-prevented'}
976976
If `up`==`true`
977-
auth_state : str{'authenticated', 'authenticating', 'held', 'init'}
977+
auth_state : str{'', 'authenticated', 'authenticating', 'held', 'init'}
978978
If `up`==`true` && has Authenticator role
979979
optics_bias_current : float
980980
optics_tx_power : float

src/mistapi/api/v1/sites/alarms.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ def countSiteAlarms(
151151
def searchSiteAlarms(
152152
mist_session: _APISession,
153153
site_id: str,
154+
group: str | None = None,
155+
severity: str | None = None,
154156
type: str | None = None,
155157
ack_admin_name: str | None = None,
156158
acked: bool | None = None,
157-
severity: str | None = None,
158-
group: str | None = None,
159159
limit: int | None = None,
160160
start: str | None = None,
161161
end: str | None = None,
@@ -177,11 +177,13 @@ def searchSiteAlarms(
177177
178178
QUERY PARAMS
179179
------------
180+
group : str{'infrastructure', 'marvis', 'security'}
181+
Alarm group. enum: `infrastructure`, `marvis`, `security`
182+
severity : str{'critical', 'info', 'warn'}
183+
Severity of the alarm. enum: `critical`, `info`, `warn`
180184
type : str
181185
ack_admin_name : str
182186
acked : bool
183-
severity : str
184-
group : str
185187
limit : int, default: 100
186188
start : str
187189
end : str
@@ -197,16 +199,16 @@ def searchSiteAlarms(
197199

198200
uri = f"/api/v1/sites/{site_id}/alarms/search"
199201
query_params: dict[str, str] = {}
202+
if group:
203+
query_params["group"] = str(group)
204+
if severity:
205+
query_params["severity"] = str(severity)
200206
if type:
201207
query_params["type"] = str(type)
202208
if ack_admin_name:
203209
query_params["ack_admin_name"] = str(ack_admin_name)
204210
if acked:
205211
query_params["acked"] = str(acked)
206-
if severity:
207-
query_params["severity"] = str(severity)
208-
if group:
209-
query_params["group"] = str(group)
210212
if limit:
211213
query_params["limit"] = str(limit)
212214
if start:

src/mistapi/api/v1/sites/devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2642,7 +2642,7 @@ def showSiteDeviceBgpSummary(
26422642
response from the API call
26432643
"""
26442644

2645-
uri = f"/api/v1/sites/{site_id}/devices/{device_id}/show_bgp_rummary"
2645+
uri = f"/api/v1/sites/{site_id}/devices/{device_id}/show_bgp_summary"
26462646
resp = mist_session.mist_post(uri=uri, body=body)
26472647
return resp
26482648

src/mistapi/api/v1/sites/sle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@deprecation.deprecated(
1919
deprecated_in="0.59.2",
2020
removed_in="0.65.0",
21-
current_version="0.59.4",
21+
current_version="0.59.5",
2222
details="function replaced with getSiteSleClassifierSummaryTrend",
2323
)
2424
def getSiteSleClassifierDetails(
@@ -741,7 +741,7 @@ def listSiteSleImpactedWirelessClients(
741741
@deprecation.deprecated(
742742
deprecated_in="0.59.2",
743743
removed_in="0.65.0",
744-
current_version="0.59.4",
744+
current_version="0.59.5",
745745
details="function replaced with getSiteSleSummaryTrend",
746746
)
747747
def getSiteSleSummary(

src/mistapi/api/v1/sites/stats.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,11 +1818,11 @@ def countSiteSwOrGwPorts(
18181818
rx_mcast_pkts : int
18191819
rx_bcast_pkts : int
18201820
speed : int
1821-
stp_state : str{'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
1821+
stp_state : str{'', 'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
18221822
If `up`==`true`
1823-
stp_role : str{'alternate', 'backup', 'designated', 'root', 'root-prevented'}
1823+
stp_role : str{'', 'alternate', 'backup', 'designated', 'disabled', 'root', 'root-prevented'}
18241824
If `up`==`true`
1825-
auth_state : str{'authenticated', 'authenticating', 'held', 'init'}
1825+
auth_state : str{'', 'authenticated', 'authenticating', 'held', 'init'}
18261826
If `up`==`true` && has Authenticator role
18271827
up : bool
18281828
start : str
@@ -2003,12 +2003,12 @@ def searchSiteSwOrGwPorts(
20032003
jitter : float
20042004
loss : float
20052005
latency : float
2006-
stp_state : str{'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
2006+
stp_state : str{'', 'blocking', 'disabled', 'forwarding', 'learning', 'listening'}
20072007
If `up`==`true`
2008-
stp_role : str{'alternate', 'backup', 'designated', 'root', 'root-prevented'}
2008+
stp_role : str{'', 'alternate', 'backup', 'designated', 'disabled', 'root', 'root-prevented'}
20092009
If `up`==`true`
20102010
xcvr_part_number : str
2011-
auth_state : str{'authenticated', 'authenticating', 'held', 'init'}
2011+
auth_state : str{'', 'authenticated', 'authenticating', 'held', 'init'}
20122012
If `up`==`true` && has Authenticator role
20132013
lte_imsi : str
20142014
lte_iccid : str

0 commit comments

Comments
 (0)