fix: connectivity panel rearrangement. LXD VM for repeatable tests.

This commit is contained in:
slawek committed 2026-11-22 15:59:40 +01:00
1 parent 85a1ffa21f
commit da889b4865
15 files changed
+363 -47

No files matched your search

+8 -1
View File
@@ -32,6 +32,11 @@ linux-manager (0.41.0-1) unstable; urgency=medium
WireGuard peers and the VPN profiles are refused.
* The Manager hides the Remote Access page while the VPN is off, and shows
only the Network tab of the Connectivity page while the router is off.
* The Network tab lists every interface but loopback by name, with its
type, external when it holds the IPv4 default route and internal
otherwise, state, addresses and MAC address; the internal gateway and the
local CIDRs are in a Router panel shown while the router is on. /config
has the interfaces in network.interfaces.
* The LDAP schema is under 1.3.6.1.4.1.67380.10.1.2, the arc listed in
OID-REGISTRY.txt.
* Ubuntu 26.04 (resolute) is the only supported release: the build image
@@ -41,7 +46,9 @@ linux-manager (0.41.0-1) unstable; urgency=medium
* A NAT rule that the configuration no longer needs is removed from the
running firewall at once, not only at the next boot.
* tests/remote/run.py tests the components on Ubuntu 26.04 instances of an
LXD remote.
LXD remote, and tests/remote/vm.py starts and removes one server
VM there to work with, reached through ports 7080, 7081 and 2222 (SSH)
of the LXD host, by default at the address of the remote's URL.
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Sat, 21 Nov 2026 23:39:03 +0100
@@ -125,6 +125,31 @@ def routes():
return None
def interfaces():
"""The network interfaces but loopback, each {name, state, mac, ipv4, ipv6} from ip -j addr show, with its IPv4
and its global IPv6 addresses as address/prefix, or None when ip fails."""
result = run('ip', '-j', 'addr', 'show')
if result is None or result.returncode != 0:
return None
try:
links = json.loads(result.stdout)
except ValueError:
return None
def addresses(link, family):
return [f'{entry["local"]}/{entry["prefixlen"]}' for entry in link.get('addr_info', [])
if entry.get('family') == family and 'local' in entry
and (family == 'inet' or entry.get('scope') == 'global')]
return [{
'name': link['ifname'],
'state': link.get('operstate'),
'mac': link.get('address'),
'ipv4': addresses(link, 'inet'),
'ipv6': addresses(link, 'inet6'),
} for link in links if link.get('link_type') != 'loopback' and 'ifname' in link]
def wireguard_details():
"""The interface and the peers of wg0, with endpoints and allowed IPs; no private or preshared key."""
result = run('wg', 'show', 'wg0', 'dump')
@@ -214,7 +239,7 @@ def details(state):
oidc = configuration.get('oidc', {}).get('enabled') is True
return {
'configuration': configuration,
'network': dict(state.get('network', {}), routes=routes()),
'network': dict(state.get('network', {}), interfaces=interfaces(), routes=routes()),
'ipsec': {
'connections': swanctl('--list-conns'),
'sas': swanctl('--list-sas'),