This commit is contained in:
2025-09-06 16:54:45 +02:00
parent a4bf07a3b6
commit d918f1e497
8 changed files with 1157 additions and 70 deletions

View File

@@ -100,14 +100,17 @@ def parse_location(location_data: Dict[str, Any]) -> Location:
host = parse_host(host_data)
hosts.append(host)
# Create location
# Create location (active and connected default to False - runtime state)
location = Location(
name=location_data['name'],
vpn_type=parse_vpn_type(location_data['vpn_type']),
connected=location_data.get('connected', False),
active=location_data.get('active', False),
connected=False, # Runtime state - always starts disconnected
active=False, # Runtime state - always starts inactive
vpn_config=location_data.get('vpn_config', ''),
hosts=hosts
hosts=hosts,
vpn_credentials=location_data.get('vpn_credentials'),
nmcli_connection_name=location_data.get('nmcli_connection_name'),
auto_import=location_data.get('auto_import', True)
)
return location