Hello,
I do some patch and appears to do the job.
I will compare network traffic.
=============
--- /opt/venvs/nav/lib/python3.7/site-packages/nav/web/geomap/db.py-orig 2023-05-16 23:26:26.604000000 -0300 +++ /opt/venvs/nav/lib/python3.7/site-packages/nav/web/geomap/db.py 2023-05-17 10:37:39.344000000 -0300 @@ -115,8 +115,7 @@ interface_swport.ifindex AS ifindex,
2 AS layer, - nettype, netident, - vlan.* + nettype, netident
FROM interface_gwport JOIN netbox ON (interface_gwport.netboxid=netbox.netboxid) @@ -151,8 +150,7 @@ netbox.sysname AS remote_sysname, netbox.netboxid AS remote_netboxid, 2 AS layer, - foo.*, - vlan.* + foo.*
FROM interface_swport JOIN netbox USING (netboxid) @@ -176,9 +174,6 @@ ) AS foo ON (foo.local_swportid = to_interfaceid)
- LEFT JOIN swportvlan ON (interface_swport.interfaceid = swportvlan.interfaceid) - LEFT JOIN vlan USING (vlanid) - JOIN room AS remote_room ON (netbox.roomid = remote_room.roomid)
WHERE ((remote_room.position[1] >= %s AND remote_room.position[0]
= %s AND
@@ -203,7 +198,6 @@ interface_swport.speed AS capacity, 2 AS layer, conn.*, - vlan.*, NULL AS remote_gwportid, NULL AS local_gwportid, NULL AS local_swportid, @@ -222,8 +216,6 @@ JOIN room USING (roomid) ) AS conn ON (conn.local_netboxid = to_netboxid)
- LEFT JOIN swportvlan ON (interface_swport.interfaceid = swportvlan.interfaceid) - LEFT JOIN vlan USING (vlanid)
JOIN room AS remote_room ON (netbox.roomid = remote_room.roomid)
@@ -284,11 +276,11 @@
connections = {}
- db_cursor.execute(LAYER_3_QUERY, network_query_args) +## db_cursor.execute(LAYER_3_QUERY, network_query_args) # Expect DictRows, but want to work with updateable dicts: - results = [lazy_dict(row) for row in db_cursor.fetchall()] +## results = [lazy_dict(row) for row in db_cursor.fetchall()] db_cursor.execute(LAYER_2_QUERY_1, network_query_args) - results.extend([lazy_dict(row) for row in db_cursor.fetchall()]) + results = [lazy_dict(row) for row in db_cursor.fetchall()] db_cursor.execute(LAYER_2_QUERY_2, network_query_args) results.extend([lazy_dict(row) for row in db_cursor.fetchall()]) db_cursor.execute(LAYER_2_QUERY_3, network_query_args) ===========
Em 08/05/2023 06:50, Morten Brekkevold escreveu:
On Mon, 1 May 2023 20:31:22 -0300 Marcos Tadeu marcos@telecom.uff.br wrote:
Can I config Geomap do not use the VLANs interfaces to trace links on map? I need only physical interfaces connections on GeoMap.
I don't think so. GeoMap works explicitly with both layer 3 and layer 2 connections in combination.