pep8 and pylint fixes; typo fix for documentation

This commit is contained in:
Ben Howard 2014-01-17 08:27:09 -07:00
parent d7fa66d440
commit 38320ca757
3 changed files with 7 additions and 10 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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