unifi-network-maps 1.4.14__py3-none-any.whl → 1.4.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- unifi_network_maps/__init__.py +1 -1
- unifi_network_maps/adapters/unifi.py +3 -5
- unifi_network_maps/model/topology.py +21 -1
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/METADATA +1 -1
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/RECORD +9 -9
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/WHEEL +0 -0
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/entry_points.txt +0 -0
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/licenses/LICENSE +0 -0
- {unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/top_level.txt +0 -0
unifi_network_maps/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.4.
|
|
1
|
+
__version__ = "1.4.15"
|
|
@@ -513,11 +513,9 @@ def fetch_networks(
|
|
|
513
513
|
controller = _init_controller(config, is_udm_pro=False)
|
|
514
514
|
|
|
515
515
|
def _fetch() -> Sequence[object]:
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
logger.warning("Networkconf model parse failed; retrying raw fetch: %s", exc)
|
|
520
|
-
return controller.get_unifi_site_networkconf(site_name=site_name, raw=True)
|
|
516
|
+
# Always use raw=True to avoid model parsing issues with disabled WAN interfaces
|
|
517
|
+
# (the UnifiNetworkConf model requires an 'enabled' field that may be absent)
|
|
518
|
+
return controller.get_unifi_site_networkconf(site_name=site_name, raw=True)
|
|
521
519
|
|
|
522
520
|
try:
|
|
523
521
|
networks = _call_with_retries("network fetch", _fetch)
|
|
@@ -302,9 +302,29 @@ def _uplink_info(device: DeviceSource) -> tuple[UplinkInfo | None, UplinkInfo |
|
|
|
302
302
|
return uplink, last_uplink
|
|
303
303
|
|
|
304
304
|
|
|
305
|
+
def _get_model_display_name(device: DeviceSource) -> str | None:
|
|
306
|
+
"""Extract the human-readable model name from device data.
|
|
307
|
+
|
|
308
|
+
UniFi stores the friendly model name (e.g., 'USW Flex 2.5G 8 PoE') in various
|
|
309
|
+
fields depending on controller version. This function checks multiple candidates
|
|
310
|
+
and returns the first non-empty value found.
|
|
311
|
+
"""
|
|
312
|
+
candidates = (
|
|
313
|
+
"model_in_lts",
|
|
314
|
+
"model_in_eol",
|
|
315
|
+
"shortname",
|
|
316
|
+
"model_name",
|
|
317
|
+
)
|
|
318
|
+
for key in candidates:
|
|
319
|
+
value = _get_attr(device, key)
|
|
320
|
+
if isinstance(value, str) and value.strip():
|
|
321
|
+
return value.strip()
|
|
322
|
+
return None
|
|
323
|
+
|
|
324
|
+
|
|
305
325
|
def coerce_device(device: DeviceSource) -> Device:
|
|
306
326
|
name = _get_attr(device, "name")
|
|
307
|
-
model_name =
|
|
327
|
+
model_name = _get_model_display_name(device) or _get_attr(device, "model")
|
|
308
328
|
model = _get_attr(device, "model")
|
|
309
329
|
mac = _get_attr(device, "mac")
|
|
310
330
|
ip = _get_attr(device, "ip") or _get_attr(device, "ip_address")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
unifi_network_maps/__init__.py,sha256=
|
|
1
|
+
unifi_network_maps/__init__.py,sha256=hbkjjRMZQ6Z1DxtYr5zQQkJBgg7BX1jvecmMzfI1XL8,23
|
|
2
2
|
unifi_network_maps/__main__.py,sha256=XsOjaqslAVgyVlOTokjVddZ2iT8apZXpJ_OB-9WEEe4,179
|
|
3
3
|
unifi_network_maps/adapters/__init__.py,sha256=nzx1KsiYalL_YuXKE6acW8Dj5flmMg0-i4gyYO0gV54,22
|
|
4
4
|
unifi_network_maps/adapters/config.py,sha256=gnvgAj9wPmYGGQfhcZSHRkcVGojODUYIINU_ztTcuUc,1671
|
|
5
|
-
unifi_network_maps/adapters/unifi.py,sha256=
|
|
5
|
+
unifi_network_maps/adapters/unifi.py,sha256=1a7NBLszpBhLnepp9WhQ5cF-HRToIG0foOA-H5xUiDI,19328
|
|
6
6
|
unifi_network_maps/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
unifi_network_maps/assets/icons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
unifi_network_maps/assets/icons/access-point.svg,sha256=RJOgO2s9Ino5lWRrh4V7q8Jdwffros5bQq3UeDuQYF4,742
|
|
@@ -68,7 +68,7 @@ unifi_network_maps/model/labels.py,sha256=m_k8mbzWtOSDOjjHhLUqwIw93pg98HAtGtHkiE
|
|
|
68
68
|
unifi_network_maps/model/lldp.py,sha256=SrPW5XC2lfJgaGeVx-KnSFNltyok7gIWWQNg1SkOaj4,3300
|
|
69
69
|
unifi_network_maps/model/mock.py,sha256=kkzt7BWt5Q8dZ2wgfgK3HLmVdHHmOjAgS_snJsWawAo,9172
|
|
70
70
|
unifi_network_maps/model/ports.py,sha256=o3NBlXcC5VV5iPWJsO4Ll1mRKJZC0f8zTHdlkkE34GU,609
|
|
71
|
-
unifi_network_maps/model/topology.py,sha256=
|
|
71
|
+
unifi_network_maps/model/topology.py,sha256=bkKSy1WlZMMkzya3bTbpYLrseXpwjhOPPoGOf4FHInM,32114
|
|
72
72
|
unifi_network_maps/model/vlans.py,sha256=EeRKvIuUs0FgEzrqbo2xi8Xlm5n5V_Z6b7jpXLiNUaY,3788
|
|
73
73
|
unifi_network_maps/render/__init__.py,sha256=nzx1KsiYalL_YuXKE6acW8Dj5flmMg0-i4gyYO0gV54,22
|
|
74
74
|
unifi_network_maps/render/device_ports_md.py,sha256=PLbP4_EDwLNkUACVJB_uM0ywaQTbEc6OWMv4QBcoJbU,16425
|
|
@@ -93,9 +93,9 @@ unifi_network_maps/render/templates/mkdocs_html_block.html.j2,sha256=5l5-BbNujOc
|
|
|
93
93
|
unifi_network_maps/render/templates/mkdocs_legend.css.j2,sha256=tkTI-RagBSgdjUygVenlTsQFenU09ePbXOfDt_Q7YRM,612
|
|
94
94
|
unifi_network_maps/render/templates/mkdocs_legend.js.j2,sha256=qMYyCKsJ84uXf1wGgzbc7Bc49RU4oyuaGK9KrgQDQEI,685
|
|
95
95
|
unifi_network_maps/render/templates/mkdocs_mermaid_block.md.j2,sha256=9IncllWQpoI8BN3A7b2zOQ5cksj97ddsjHJ-aBhpw7o,66
|
|
96
|
-
unifi_network_maps-1.4.
|
|
97
|
-
unifi_network_maps-1.4.
|
|
98
|
-
unifi_network_maps-1.4.
|
|
99
|
-
unifi_network_maps-1.4.
|
|
100
|
-
unifi_network_maps-1.4.
|
|
101
|
-
unifi_network_maps-1.4.
|
|
96
|
+
unifi_network_maps-1.4.15.dist-info/licenses/LICENSE,sha256=mYo1siIIfIwyfdOuK2-Zt0ij2xBTii2hnpeTu79nD80,1074
|
|
97
|
+
unifi_network_maps-1.4.15.dist-info/METADATA,sha256=Mc5M1u-ACVLVZm6xX-Giv4KhP7r7wZ5V1jfvBoKriYY,10079
|
|
98
|
+
unifi_network_maps-1.4.15.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
99
|
+
unifi_network_maps-1.4.15.dist-info/entry_points.txt,sha256=cdJ7jsBgNgHxSflYUOqgz5BbvuM0Nnh-x8_Hbyh_LFg,67
|
|
100
|
+
unifi_network_maps-1.4.15.dist-info/top_level.txt,sha256=G0rUX1PNfVCn1u-KtB6QjFQHopCOVLnPMczvPOoraHg,19
|
|
101
|
+
unifi_network_maps-1.4.15.dist-info/RECORD,,
|
|
File without changes
|
{unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.14.dist-info → unifi_network_maps-1.4.15.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|