From 088b3b7eaab6c36ef404978f10c514785651a8fd Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sun, 12 Oct 2014 10:12:00 -0700 Subject: Retain the old behavior for mandatory keys The keys 'server_url' and 'validation_name' were previously mandatory, we should retain that behavior for now. --- cloudinit/config/cc_chef.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py index 687be69f..1e44ec72 100644 --- a/cloudinit/config/cc_chef.py +++ b/cloudinit/config/cc_chef.py @@ -111,13 +111,13 @@ def get_template_params(iid, chef_cfg, log): # These ones are overwritten to be exact values... params.update({ 'generated_by': util.make_header(), - 'server_url': util.get_cfg_option_str(chef_cfg, 'server_url'), 'node_name': util.get_cfg_option_str(chef_cfg, 'node_name', default=iid), 'environment': util.get_cfg_option_str(chef_cfg, 'environment', default='_default'), - 'validation_name': util.get_cfg_option_str(chef_cfg, - 'validation_name'), + # These two are mandatory... + 'server_url': chef_cfg['server_url'], + 'validation_name': chef_cfg['validation_name'], }) return params -- cgit v1.2.3