def load_parameters(stack):
"""load parameters from yaml file and return as dictionary"""
params = []
param_path = path.join('stacks', stack, 'parameters.yaml')
if not path.exists(param_path):
return params
with open(param_path, encoding='utf-8') as file:
params_raw = yaml.load(file.read())
# build parameter dict
for param in params_raw.keys():
params.append({
'ParameterKey': param,
'ParameterValue': params_raw[param]
})
return params
评论列表
文章目录