proxies: add smart proxy support

still to do:

* document new configuration options
* add smart proxies to groups view
* import bandwidth and CPU alarms
This commit is contained in:
Iain Learmonth 2022-05-24 19:51:38 +01:00
parent 9b90101cf4
commit 66af6e6550
15 changed files with 275 additions and 32 deletions

View file

@ -3,8 +3,6 @@ import subprocess # nosec
from abc import abstractmethod
from typing import Any, Optional, Tuple
import jinja2
from app.terraform import BaseAutomation
@ -151,6 +149,4 @@ class TerraformAutomation(BaseAutomation):
return json.loads(terraform.stdout)
def tf_write(self, template: str, **kwargs: Any) -> None:
tmpl = jinja2.Template(template)
with open(self.working_directory("main.tf"), 'w') as tf:
tf.write(tmpl.render(**kwargs))
self.tmpl_write("main.tf", template, **kwargs)