Пример #1
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))
Пример #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
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
def confirm():
    fileutils.touch_file(P_VDSM_CLIENT_LOG)
Пример #6
0
def add(device_name):
    logging.debug('Add iface tracking for device %s', device_name)
    touch_file(_filepath(device_name))
Пример #7
0
def confirm():
    fileutils.touch_file(P_VDSM_CLIENT_LOG)
Пример #8
0
def stop():
    fileutils.touch_file(MONITOR_STOP_SIG_FILE)
Пример #9
0
def add(device_name):
    logging.debug('Add iface tracking for device %s', device_name)
    touch_file(_filepath(device_name))
Пример #10
0
def stop():
    fileutils.touch_file(MONITOR_STOP_SIG_FILE)