From 537b9cab037aecfd18edef156dd3ea55072918e9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Mar 2022 01:57:57 +1100 Subject: Rework network config (#1001) * Update network configuration * Rework network configuration * Update documentation * Fix flake8 * Update Co-authored-by: Daniel Girtler Co-authored-by: Anton Hvornum --- archinstall/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'archinstall/__init__.py') diff --git a/archinstall/__init__.py b/archinstall/__init__.py index cb95028b..8c64a1f3 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -123,7 +123,7 @@ def parse_unspecified_argument_list(unknowns :list, multiple :bool = False, erro print(f" We ignore the entry {element} as it isn't related to any argument") return config -def get_arguments(): +def get_arguments() -> Dict[str, Any]: """ The handling of parameters from the command line Is done on following steps: 0) we create a dict to store the arguments and their values @@ -203,13 +203,8 @@ def load_config(): storage['gfx_driver_packages'] = AVAILABLE_GFX_DRIVERS.get(arguments.get('gfx_driver', None), None) if arguments.get('servers', None) is not None: storage['_selected_servers'] = arguments.get('servers', None) - if nic_config := arguments.get('nic', {}): - if isinstance(nic_config,str) or nic_config.get('nic', '') == 'Copy ISO network configuration to installation': - arguments['nic'] = {'type': 'iso_config'} - elif 'NetworkManager' in nic_config: - arguments['nic'] = {'type': 'network_manager', 'NetworkManager': True} - else: - arguments['nic'] = {k if k != 'nic' else 'type': v for k, v in nic_config.items()} + if arguments.get('nic', None) is not None: + arguments['nic'] = NetworkConfiguration.parse_arguments(arguments.get('nic')) def post_process_arguments(arguments): storage['arguments'] = arguments -- cgit v1.2.3-54-g00ecf