def unified_restoration(): """ Builds a setupNetworks command from the persistent configuration to set it as running configuration. """ networkmanager.init() persistent_config = PersistentConfig() available_config = _filter_available(persistent_config) _verify_all_devices_are_up(list(_owned_ifcfg_files())) _wait_for_for_all_devices_up(available_config.networks.keys() + available_config.bonds.keys()) if ipv6_supported(): _restore_disable_ipv6() classified_conf = _classify_nets_bonds_config(available_config) setup_nets, setup_bonds, remove_nets, remove_bonds = classified_conf logging.info('Remove networks (%s) and bonds (%s).', remove_nets, remove_bonds) _greedy_setup_bonds(remove_bonds) _greedy_setup_nets(remove_nets) _restore_non_vdsm_net_devices() _convert_to_blocking_dhcp(setup_nets) logging.info('Setup networks (%s) and bonds (%s).', setup_nets, setup_bonds) _greedy_setup_bonds(setup_bonds) _greedy_setup_nets(setup_nets)
def unified_restoration(): """ Builds a setupNetworks command from the persistent configuration to set it as running configuration. """ networkmanager.init() persistent_config = PersistentConfig() available_config = _filter_available(persistent_config) _verify_all_devices_are_up(list(_owned_ifcfg_files())) _wait_for_for_all_devices_up( available_config.networks.keys() + available_config.bonds.keys()) if ipv6_supported(): _restore_disable_ipv6() classified_conf = _classify_nets_bonds_config(available_config) setup_nets, setup_bonds, remove_nets, remove_bonds = classified_conf logging.info( 'Remove networks (%s) and bonds (%s).', remove_nets, remove_bonds) _greedy_setup_bonds(remove_bonds) _greedy_setup_nets(remove_nets) _restore_non_vdsm_net_devices() _convert_to_blocking_dhcp(setup_nets) logging.info( 'Setup networks (%s) and bonds (%s).', setup_nets, setup_bonds) _greedy_setup_bonds(setup_bonds) _greedy_setup_nets(setup_nets)
def setup_module(): global _nm_service _nm_service = NMService() _nm_service.setup() try: networkmanager.init() except DBusException as ex: # Unfortunately, nose labeling does not operate on module fixtures. # We let the test fail if init was not successful. if 'Failed to connect to socket' not in ex.args[0]: raise
def setup_module(): global _nm_service _nm_service = NMService() _nm_service.setup() try: networkmanager.init() except DBusException as ex: # Unfortunately, nose labeling does not operate on module fixtures. # We let the test fail if init was not successful. if 'Failed to connect to socket' not in ex.args[0]: raise
def setup(): requires_systemctl() nm_service = NMService() nm_service.setup() try: networkmanager.init() except DBusException as ex: if 'Failed to connect to socket' not in ex.args[0]: pytest.skip('dbus socket or the NM service may not be available') yield nm_service.teardown()
def init_privileged_network_components(): networkmanager.init() _lldp_init()
def init_privileged_network_components(): networkmanager.init()
def init(): logging.info('Initializing VDSM components.') networkmanager.init()