diff options
author | Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com> | 2021-08-13 09:08:53 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 21:38:53 -0600 |
commit | 04047438d7bbca0367f1b0722c0959fd92166e3e (patch) | |
tree | 20232debe1e17d9c24a197beb5e500ad881ba497 /cloudinit/config | |
parent | 1c3b10b58768ec4c70384f4a7af7ce956518fe7c (diff) | |
download | vyos-cloud-init-04047438d7bbca0367f1b0722c0959fd92166e3e.tar.gz vyos-cloud-init-04047438d7bbca0367f1b0722c0959fd92166e3e.zip |
cc_resolv_conf: fix typos (#969)
Add tests for cc_resolv_conf handler
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_resolv_conf.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py index c51967e2..648935e4 100644 --- a/cloudinit/config/cc_resolv_conf.py +++ b/cloudinit/config/cc_resolv_conf.py @@ -108,18 +108,19 @@ def handle(name, cfg, cloud, log, _args): if "resolv_conf" not in cfg: log.warning("manage_resolv_conf True but no parameters provided!") + return try: template_fn = cloud.get_template_filename( - RESOLVE_CONFIG_TEMPLATE_MAP[cloud.distro.resolv_conf_fn]) + RESOLVE_CONFIG_TEMPLATE_MAP[cloud.distro.resolve_conf_fn]) except KeyError: - log.warning("No template found, not rendering /etc/resolv.conf") + log.warning("No template found, not rendering resolve configs") return generate_resolv_conf( template_fn=template_fn, params=cfg["resolv_conf"], - target_fname=cloud.disro.resolve_conf_fn + target_fname=cloud.distro.resolve_conf_fn ) return |