summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_final_message.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-03-12 10:59:13 -0400
committerScott Moser <smoser@ubuntu.com>2014-03-12 10:59:13 -0400
commitd9661a8ef4c6003ef48757715965ebb5c071c80b (patch)
tree6f418c20132fb53bfa9eda8a6c86eda88178b424 /cloudinit/config/cc_final_message.py
parent3997ae9f49caede4bea7da4c0cd1c7d30d36fe0a (diff)
downloadvyos-cloud-init-d9661a8ef4c6003ef48757715965ebb5c071c80b.tar.gz
vyos-cloud-init-d9661a8ef4c6003ef48757715965ebb5c071c80b.zip
final_message: allow replacement of capital name keys.
documentation of final_message in doc/examples/cloud-config-final-message.txt showed '$UPTIME' and '$TIMESTAMP' would be available, but only the lower case versions of these strings were available. This change just makes all lower case and upper case keys available here to avoid breaking anyone who used the functional-but-not-correctly-documented lower case names. LP: #1286164
Diffstat (limited to 'cloudinit/config/cc_final_message.py')
-rw-r--r--cloudinit/config/cc_final_message.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/config/cc_final_message.py b/cloudinit/config/cc_final_message.py
index e92cba4a..b24294e4 100644
--- a/cloudinit/config/cc_final_message.py
+++ b/cloudinit/config/cc_final_message.py
@@ -53,6 +53,7 @@ def handle(_name, cfg, cloud, log, args):
'version': cver,
'datasource': str(cloud.datasource),
}
+ subs.update(dict([(k.upper(), v) for k, v in subs.items()]))
util.multi_log("%s\n" % (templater.render_string(msg_in, subs)),
console=False, stderr=True, log=log)
except Exception: