automation: establish an automation framework

This commit is contained in:
Iain Learmonth 2022-05-08 17:20:04 +01:00
parent 1b53bf451c
commit 8abe5d60fa
31 changed files with 586 additions and 274 deletions

View file

@ -37,6 +37,8 @@ class ProxyAutomation(TerraformAutomation):
for group in groups:
subgroup = 0
for origin in group.origins:
if origin.destroyed is not None:
continue
while True:
if subgroups[group.id][subgroup] >= self.subgroup_max:
subgroup += 1
@ -87,7 +89,7 @@ class ProxyAutomation(TerraformAutomation):
self.deprecate_orphaned_proxies()
self.destroy_expired_proxies()
def tf_posthook(self):
def tf_posthook(self, *, prehook_result):
self.import_state(self.tf_show())
def tf_generate(self):