summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/stages.py11
-rw-r--r--doc/vendordata.txt2
-rw-r--r--tests/unittests/test_data.py4
3 files changed, 7 insertions, 10 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 5dced998..8ae0bc0d 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -26,8 +26,7 @@ import copy
import os
import sys
-from cloudinit.settings import (PER_ALWAYS, PER_INSTANCE, FREQUENCIES,
- CLOUD_CONFIG)
+from cloudinit.settings import (PER_INSTANCE, FREQUENCIES, CLOUD_CONFIG)
from cloudinit import handlers
@@ -510,13 +509,13 @@ class Init(object):
vdcfg = {'enabled': False}
LOG.warn("invalid 'vendor_data' setting. resetting to: %s", vdcfg)
- if not util.is_true(vdcfg.get('enabled')):
- LOG.debug("vendordata consumption is disabled.")
- return
-
enabled = vdcfg.get('enabled')
no_handlers = vdcfg.get('disabled_handlers', None)
+ if not util.is_true(enabled):
+ LOG.debug("vendordata consumption is disabled.")
+ return
+
LOG.debug("vendor data will be consumed. disabled_handlers=%s",
no_handlers)
diff --git a/doc/vendordata.txt b/doc/vendordata.txt
index 63a6c999..530e3b4c 100644
--- a/doc/vendordata.txt
+++ b/doc/vendordata.txt
@@ -20,7 +20,7 @@ user can accidently override choices.
Further, we strongly advise vendors to not 'be evil'. By evil, we
mean any action that could compromise a system. Since users trust
you, please take care to make sure that any vendordata is safe,
-atomic, indopenant and does not put your users at risk.
+atomic, idempotent and does not put your users at risk.
cloud-init can read this input and act on it in different ways.
diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py
index a753debf..68729c57 100644
--- a/tests/unittests/test_data.py
+++ b/tests/unittests/test_data.py
@@ -264,13 +264,11 @@ vendor_data:
freq=PER_INSTANCE)
mods = stages.Modules(initer)
(_which_ran, _failures) = mods.run_section('cloud_init_modules')
- cfg = mods.cfg
+ _cfg = mods.cfg
vendor_script = initer.paths.get_ipath_cur('vendor_scripts')
vendor_script_fns = "%s%s/part-001" % (new_root, vendor_script)
self.assertTrue(os.path.exists(vendor_script_fns))
-
-
def test_merging_cloud_config(self):
blob = '''
#cloud-config