Skip to content

Commit e376697

Browse files
committed
refactor(insights): remove unused countSiteClientFingerprints and searchSiteClientFingerprints functions
1 parent 4a18308 commit e376697

1 file changed

Lines changed: 0 additions & 157 deletions

File tree

‎src/mistapi/api/v1/sites/insights.py‎

Lines changed: 0 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -287,163 +287,6 @@ def getSiteInsightMetricsForDevice(
287287
return resp
288288

289289

290-
def countSiteClientFingerprints(
291-
mist_session: _APISession,
292-
site_id: str,
293-
distinct: str | None = None,
294-
start: str | None = None,
295-
end: str | None = None,
296-
duration: str | None = None,
297-
limit: int | None = None,
298-
) -> _APIResponse:
299-
"""
300-
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/nac-fingerprints/count-site-client-fingerprints
301-
302-
PARAMS
303-
-----------
304-
mistapi.APISession : mist_session
305-
mistapi session including authentication and Mist host information
306-
307-
PATH PARAMS
308-
-----------
309-
site_id : str
310-
311-
QUERY PARAMS
312-
------------
313-
distinct : str{'family', 'model', 'os', 'os_type'}, default: family
314-
Field used to group this count response. enum: `family`, `model`, `os`, `os_type`
315-
start : str
316-
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
317-
end : str
318-
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
319-
duration : str, default: 1d
320-
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
321-
limit : int, default: 100
322-
Maximum number of results to return per page
323-
324-
RETURN
325-
-----------
326-
mistapi.APIResponse
327-
response from the API call
328-
"""
329-
330-
uri = f"/api/v1/sites/{site_id}/insights/fingerprints/count"
331-
query_params: dict[str, str] = {}
332-
if distinct:
333-
query_params["distinct"] = str(distinct)
334-
if start:
335-
query_params["start"] = str(start)
336-
if end:
337-
query_params["end"] = str(end)
338-
if duration:
339-
query_params["duration"] = str(duration)
340-
if limit:
341-
query_params["limit"] = str(limit)
342-
resp = mist_session.mist_get(uri=uri, query=query_params)
343-
return resp
344-
345-
346-
def searchSiteClientFingerprints(
347-
mist_session: _APISession,
348-
site_id: str,
349-
family: str | None = None,
350-
client_type: str | None = None,
351-
model: str | None = None,
352-
mfg: str | None = None,
353-
os: str | None = None,
354-
os_type: str | None = None,
355-
mac: str | None = None,
356-
limit: int | None = None,
357-
start: str | None = None,
358-
end: str | None = None,
359-
duration: str | None = None,
360-
interval: str | None = None,
361-
sort: str | None = None,
362-
search_after: str | None = None,
363-
) -> _APIResponse:
364-
"""
365-
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/nac-fingerprints/search-site-client-fingerprints
366-
367-
PARAMS
368-
-----------
369-
mistapi.APISession : mist_session
370-
mistapi session including authentication and Mist host information
371-
372-
PATH PARAMS
373-
-----------
374-
site_id : str
375-
376-
QUERY PARAMS
377-
------------
378-
family : str
379-
Device Category of the client device
380-
client_type : str{'wireless', 'wired', 'vty'}
381-
Filter results by client type. enum: `wireless`, `wired`, `vty`
382-
model : str
383-
Filter results by device model
384-
mfg : str
385-
Manufacturer name of the client device
386-
os : str
387-
Operating System name and version of the client device
388-
os_type : str
389-
Operating system name of the client device
390-
mac : str
391-
Filter results by MAC address
392-
limit : int, default: 100
393-
Maximum number of results to return per page
394-
start : str
395-
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
396-
end : str
397-
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
398-
duration : str, default: 1d
399-
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
400-
interval : str
401-
Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to.
402-
sort : str, default: wxid
403-
On which field the list should be sorted, -prefix represents DESC order.
404-
search_after : str
405-
Pagination cursor for retrieving subsequent pages of results. This value is automatically populated by Mist in the `next` URL from the previous response and should not be manually constructed.
406-
407-
RETURN
408-
-----------
409-
mistapi.APIResponse
410-
response from the API call
411-
"""
412-
413-
uri = f"/api/v1/sites/{site_id}/insights/fingerprints/search"
414-
query_params: dict[str, str] = {}
415-
if family:
416-
query_params["family"] = str(family)
417-
if client_type:
418-
query_params["client_type"] = str(client_type)
419-
if model:
420-
query_params["model"] = str(model)
421-
if mfg:
422-
query_params["mfg"] = str(mfg)
423-
if os:
424-
query_params["os"] = str(os)
425-
if os_type:
426-
query_params["os_type"] = str(os_type)
427-
if mac:
428-
query_params["mac"] = str(mac)
429-
if limit:
430-
query_params["limit"] = str(limit)
431-
if start:
432-
query_params["start"] = str(start)
433-
if end:
434-
query_params["end"] = str(end)
435-
if duration:
436-
query_params["duration"] = str(duration)
437-
if interval:
438-
query_params["interval"] = str(interval)
439-
if sort:
440-
query_params["sort"] = str(sort)
441-
if search_after:
442-
query_params["search_after"] = str(search_after)
443-
resp = mist_session.mist_get(uri=uri, query=query_params)
444-
return resp
445-
446-
447290
def getSiteInsightMetricsForGateway(
448291
mist_session: _APISession,
449292
site_id: str,

0 commit comments

Comments
 (0)