diff --git a/src/main/python/ddadevops/c4k_mixin.py b/src/main/python/ddadevops/c4k_mixin.py new file mode 100644 index 0000000..1929cfa --- /dev/null +++ b/src/main/python/ddadevops/c4k_mixin.py @@ -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'], [])