Start implementation of c4k-mixin
This commit is contained in:
parent
1b9e7f20fd
commit
570a31a9f9
1 changed files with 41 additions and 0 deletions
41
src/main/python/ddadevops/c4k_mixin.py
Normal file
41
src/main/python/ddadevops/c4k_mixin.py
Normal 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'], [])
|
Loading…
Reference in a new issue