From d9661a8ef4c6003ef48757715965ebb5c071c80b Mon Sep 17 00:00:00 2001
From: Scott Moser <smoser@ubuntu.com>
Date: Wed, 12 Mar 2014 10:59:13 -0400
Subject: 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
---
 cloudinit/config/cc_final_message.py | 1 +
 1 file changed, 1 insertion(+)

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:
-- 
cgit v1.2.3