Start implementation of c4k-mixin

This commit is contained in:
bom 2022-12-16 15:04:32 +01:00
parent 1b9e7f20fd
commit 570a31a9f9

View file

@ -0,0 +1,41 @@
from string import Template
from subprocess import run
#from .python_util import *
#from .devops_build import DevopsBuild
def add_c4k_mixin_config(config,
config_keys,
auth_keys,
c4k_config_template=None,
c4k_auth_template=None):
if c4k_config_template == None:
c4k_config_template = '{'
for key in config_keys:
c4k_config_template += f':{key} "${key}"\n'
c4k_config_template += '}'
if c4k_auth_template == None:
c4k_auth_template = '{'
for key in auth_keys:
c4k_auth_template += f':{key} "${key}"\n'
c4k_auth_template += '}'
#DevopsBuild
class C4kMixin():
def __init__(self, project, config):
super().__init__(project, config)
c4k_mixin_config = config['C4kMixin']
def write_c4k_config(self):
raise NotImplemented
def write_c4k_auth(self):
raise NotImplemented
def c4k_apply(self):
raise NotImplemented
add_c4k_mixin_config({}, ['test', 'test2', 'fqdn'], [])