コード例 #1
0
ファイル: moduleloader_test.py プロジェクト: EdDev/vdsm
 def _setup_test_modules(self, files):
     with namedTemporaryDir() as path:
         for f in files:
             fileutils.touch_file(os.path.join(path, f))
         fileutils.touch_file(os.path.join(path, '__init__.py'))
         sys.path.insert(0, os.path.dirname(path))
         yield importlib.import_module(os.path.basename(path))
コード例 #2
0
 def _setup_test_modules(self, files):
     with namedTemporaryDir() as path:
         for f in files:
             fileutils.touch_file(os.path.join(path, f))
         fileutils.touch_file(os.path.join(path, '__init__.py'))
         sys.path.insert(0, os.path.dirname(path))
         yield importlib.import_module(os.path.basename(path))
コード例 #3
0
ファイル: upgrade.py プロジェクト: EdDev/vdsm
def _upgrade_seal(upgrade):
    seal_file = _upgrade_seal_path(upgrade)
    try:
        fileutils.touch_file(seal_file)
    except (OSError, IOError):
        _get_upgrade_log().exception("Failed to seal upgrade %s", upgrade.name)
    else:
        _get_upgrade_log().debug("Upgrade %s successfully performed",
                                 upgrade.name)
コード例 #4
0
def _upgrade_seal(upgrade):
    seal_file = _upgrade_seal_path(upgrade)
    try:
        fileutils.touch_file(seal_file)
    except (OSError, IOError):
        _get_upgrade_log().exception("Failed to seal upgrade %s", upgrade.name)
    else:
        _get_upgrade_log().debug("Upgrade %s successfully performed",
                                 upgrade.name)
コード例 #5
0
ファイル: connectivity.py プロジェクト: xin49/vdsm
def confirm():
    fileutils.touch_file(P_VDSM_CLIENT_LOG)
コード例 #6
0
ファイル: ifacetracking.py プロジェクト: xiaojiongming/vdsm
def add(device_name):
    logging.debug('Add iface tracking for device %s', device_name)
    touch_file(_filepath(device_name))
コード例 #7
0
ファイル: connectivity.py プロジェクト: nirs/vdsm
def confirm():
    fileutils.touch_file(P_VDSM_CLIENT_LOG)
コード例 #8
0
ファイル: dhclient_monitor.py プロジェクト: wuyeliang/vdsm
def stop():
    fileutils.touch_file(MONITOR_STOP_SIG_FILE)
コード例 #9
0
ファイル: ifacetracking.py プロジェクト: EdDev/vdsm
def add(device_name):
    logging.debug('Add iface tracking for device %s', device_name)
    touch_file(_filepath(device_name))
コード例 #10
0
ファイル: dhclient_monitor.py プロジェクト: nirs/vdsm
def stop():
    fileutils.touch_file(MONITOR_STOP_SIG_FILE)