stuff
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user