feat: add container network filtering, enhance IP address display, and improve workload insights UI
Add is_docker_or_container_network helper to detect Docker bridge, Kubernetes CNI, and loopback networks, implement cleanup_discovered_container_networks to remove container bridge IPs from discovered networks during IPAM discovery, add ip_address_payload helper to enrich IP addresses with subnet CIDR and workload details, update ProxmoxProvider to ignore guest interfaces matching common container pref
This commit is contained in:
@@ -7,6 +7,17 @@ from app.services.providers.base import Provider, ProviderConnection
|
||||
|
||||
class ProxmoxProvider(Provider):
|
||||
name = "proxmox"
|
||||
ignored_guest_interface_prefixes = (
|
||||
"br-",
|
||||
"cali",
|
||||
"cni",
|
||||
"docker",
|
||||
"flannel",
|
||||
"kube",
|
||||
"lo",
|
||||
"veth",
|
||||
"virbr",
|
||||
)
|
||||
|
||||
def auth_header(self, token: str) -> str:
|
||||
token = token.strip()
|
||||
@@ -67,6 +78,9 @@ class ProxmoxProvider(Provider):
|
||||
return
|
||||
interfaces = response.json().get("data", {}).get("result", [])
|
||||
for interface in interfaces:
|
||||
interface_name = str(interface.get("name") or "").lower()
|
||||
if interface_name.startswith(self.ignored_guest_interface_prefixes):
|
||||
continue
|
||||
for address in interface.get("ip-addresses", []):
|
||||
ip_address = address.get("ip-address")
|
||||
prefix = address.get("prefix")
|
||||
|
||||
Reference in New Issue
Block a user