Commit cc6e12ef authored by Boxiang Sun's avatar Boxiang Sun

Let parsed_parameters can get '_' correctly from instance-parameter:configuration

There will have an error if we didn't provide `_` parameters in
`instance-parameter:configuration`. This command contains some corner
cases that cannot parsed by json directly. This commit did some work
to ensure we can get the correct parsed_parameters.
parent efcd31e7
......@@ -50,7 +50,10 @@ def main():
args = parser.parse_args()
import json
parsed_parameters = json.loads('$${instance-parameter:configuration._}')
no_py_prefix = '''$${instance-parameter:configuration}'''[4:] # The input_str has "!py!" prefix.
json_style_para = no_py_prefix.replace('\'', '\"')
parameters = json.loads(json_style_para)
parsed_parameters = json.loads(parameters.get('_', '{}'))
if not getattr(args, 'target', None):
......
......@@ -107,7 +107,7 @@ mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum = fcf15b2a90340e0afe8f8b9921a4ffae
md5sum = 37730bd272af03b8245ce6cc2e9801dd
output = ${buildout:directory}/runTestSuite.in
mode = 0644
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment