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))
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)
def confirm(): fileutils.touch_file(P_VDSM_CLIENT_LOG)
def add(device_name): logging.debug('Add iface tracking for device %s', device_name) touch_file(_filepath(device_name))
def stop(): fileutils.touch_file(MONITOR_STOP_SIG_FILE)