outposts: fix outpost delete hanging thread, run cleanup in async task with info from cache with ability to retry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-05-10 17:11:31 +02:00
parent 4b52697cfe
commit c2f8ff55cf
5 changed files with 45 additions and 50 deletions

View File

@ -56,6 +56,12 @@ class BaseController:
"""Handler to delete everything we've created"""
raise NotImplementedError
def down_with_logs(self) -> list[str]:
"""Call .down() but capture all log output and return it."""
with capture_logs() as logs:
self.down()
return [x["event"] for x in logs]
def get_static_deployment(self) -> str:
"""Return a static deployment configuration"""
raise NotImplementedError