diff options
author | DR695H <dr695h@att.com> | 2017-02-15 18:21:12 -0500 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2017-02-15 18:23:10 -0500 |
commit | 5fa0146de7ad7aa73f533253a57f3798b02cca39 (patch) | |
tree | ba3f0e5a3755af179478b7f0c1434feae0294384 /eteutils/StringTemplater.py | |
parent | 9ef2b0130988e923bdf96b563d8457be9ba70ee1 (diff) |
Initial checkin of OpenECOMP testing utilsrelease-1.0.0
Change-Id: Ife652fabd1ee64d73d0cb0b72f954b9a44de615f
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'eteutils/StringTemplater.py')
-rw-r--r-- | eteutils/StringTemplater.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/eteutils/StringTemplater.py b/eteutils/StringTemplater.py new file mode 100644 index 0000000..680600f --- /dev/null +++ b/eteutils/StringTemplater.py @@ -0,0 +1,8 @@ +from string import Template + +class StringTemplater: + """StringTemplater is common resource for templating with strings.""" + + def template_string(self, template, values): + """Template String takes in a string and its values and converts it using the string.Template class""" + return Template(template).substitute(values)
\ No newline at end of file |