コード例 #1
0
def _verify_all_devices_are_up(owned_ifcfg_files):
    """REQUIRED_FOR upgrade from 4.16<=vdsm<=4.16.20
    Were ifcfg files were created with ONBOOT=no.
    """
    for ifcfg_file in owned_ifcfg_files:
        _upgrade_onboot(ifcfg_file)
    down_links = _get_links_with_state_down(
        [os.path.basename(name) for name in owned_ifcfg_files])
    if down_links:
        logging.debug("Some of the devices are down (%s).", down_links)
        ifcfg.start_devices(owned_ifcfg_files)
コード例 #2
0
ファイル: restore_net_config.py プロジェクト: nirs/vdsm
def _verify_all_devices_are_up(owned_ifcfg_files):
    """REQUIRED_FOR upgrade from 4.16<=vdsm<=4.16.20
    Were ifcfg files were created with ONBOOT=no.
    """
    for ifcfg_file in owned_ifcfg_files:
        _upgrade_onboot(ifcfg_file)
    down_links = _get_links_with_state_down(
        [os.path.basename(name) for name in owned_ifcfg_files])
    if down_links:
        logging.debug("Some of the devices are down (%s).", down_links)
        ifcfg.start_devices(owned_ifcfg_files)