TestUtils.py
8.24 KB
-
Create a string parser for varReplace instead of using re · 9e4fac5e
This fixes a few issues, - ${foo}${bar} would be parsed as a variable named foo}${bar, which wouldn't be easily fixed without breaking ${foo.${bar}} - allows escaping . in variable parts so e.g. ${hostvars.{test.example.com}.foo} works This is slower than using re. 3 million templating calls take about about twice as long to complete with this compared to the regexp, from ~65 seconds to ~115 seconds on my laptop.
Daniel Hokka Zakrisson committed