def cleanup_instance(approot, runtime, instance, runtime_param): """Actually do the cleanup of the instance. """ param = utils.equals_list2dict(runtime_param or []) cleaner = cleanup.Cleanup(approot) cleaner.invoke(runtime, instance, param)
def cleanup_instance(approot, runtime, instance, runtime_param): """Actually do the cleanup of the instance. """ param = utils.equals_list2dict(runtime_param or []) tm_env = appenv.AppEnvironment(root=approot) cleaner = cleanup.Cleanup(tm_env) cleaner.invoke(runtime, instance, param)
def setUp(self): self.root = tempfile.mkdtemp() self.cleanup_dir = os.path.join(self.root, 'cleanup') self.cleaning_dir = os.path.join(self.root, 'cleaning') self.cleanup_apps_dir = os.path.join(self.root, 'cleanup_apps') for tmp_dir in [ self.cleanup_dir, self.cleaning_dir, self.cleanup_apps_dir ]: os.mkdir(tmp_dir) self.cleanup = cleanup.Cleanup(root=self.root) self.cleanup.tm_env.root = self.root self.cleanup.tm_env.cleanup_dir = self.cleanup_dir self.cleanup.tm_env.cleaning_dir = self.cleaning_dir self.cleanup.tm_env.cleanup_apps_dir = self.cleanup_apps_dir
def setUp(self): self.root = tempfile.mkdtemp() self.cleanup_dir = os.path.join(self.root, 'cleanup') self.cleaning_dir = os.path.join(self.root, 'cleaning') self.cleanup_apps_dir = os.path.join(self.root, 'cleanup_apps') self.cleanup_tombstone_dir = os.path.join(self.root, 'tombstones') for tmp_dir in [ self.cleanup_dir, self.cleaning_dir, self.cleanup_apps_dir ]: os.mkdir(tmp_dir) self.tm_env = mock.Mock( root=self.root, cleanup_dir=self.cleanup_dir, cleaning_dir=self.cleaning_dir, cleanup_apps_dir=self.cleanup_apps_dir, cleanup_tombstone_dir=self.cleanup_tombstone_dir) self.cleanup = cleanup.Cleanup(self.tm_env)
def cleanup_watcher(approot): """Start cleanup watcher.""" tm_env = appenv.AppEnvironment(root=approot) cleaner = cleanup.Cleanup(tm_env) cleaner.run()
def cleanup_watcher(approot): """Start cleanup watcher.""" cleaner = cleanup.Cleanup(approot) cleaner.run()