def export(self, job, jail): """Exports jail to zip file""" uuid, path, _ = self.check_jail_existence(jail) status, jid = IOCList.list_get_jid(uuid) started = False if status: self.stop(jail) started = True IOCImage().export_jail(uuid, path) if started: self.start(jail) return True
def export(self, job, jail): """Exports jail to zip file""" uuid, path, _ = self.check_jail_existence(jail) status, jid = IOCList.list_get_jid(uuid) started = False if status: self.middleware.call_sync('jail.stop', jail, job=True) started = True IOCImage().export_jail(uuid, path) if started: self.middleware.call_sync('jail.start', jail, job=True) return True
def _import(self, job, jail): """Imports jail from zip file""" IOCImage().import_jail(jail) return True