pep8 and pylint fixes; typo fix for documentation
This commit is contained in:
parent
d7fa66d440
commit
38320ca757
|
@ -26,8 +26,7 @@ import copy
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from cloudinit.settings import (PER_ALWAYS, PER_INSTANCE, FREQUENCIES,
|
from cloudinit.settings import (PER_INSTANCE, FREQUENCIES, CLOUD_CONFIG)
|
||||||
CLOUD_CONFIG)
|
|
||||||
|
|
||||||
from cloudinit import handlers
|
from cloudinit import handlers
|
||||||
|
|
||||||
|
@ -510,13 +509,13 @@ class Init(object):
|
||||||
vdcfg = {'enabled': False}
|
vdcfg = {'enabled': False}
|
||||||
LOG.warn("invalid 'vendor_data' setting. resetting to: %s", vdcfg)
|
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')
|
enabled = vdcfg.get('enabled')
|
||||||
no_handlers = vdcfg.get('disabled_handlers', None)
|
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",
|
LOG.debug("vendor data will be consumed. disabled_handlers=%s",
|
||||||
no_handlers)
|
no_handlers)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ user can accidently override choices.
|
||||||
Further, we strongly advise vendors to not 'be evil'. By evil, we
|
Further, we strongly advise vendors to not 'be evil'. By evil, we
|
||||||
mean any action that could compromise a system. Since users trust
|
mean any action that could compromise a system. Since users trust
|
||||||
you, please take care to make sure that any vendordata is safe,
|
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.
|
cloud-init can read this input and act on it in different ways.
|
||||||
|
|
||||||
|
|
|
@ -264,13 +264,11 @@ vendor_data:
|
||||||
freq=PER_INSTANCE)
|
freq=PER_INSTANCE)
|
||||||
mods = stages.Modules(initer)
|
mods = stages.Modules(initer)
|
||||||
(_which_ran, _failures) = mods.run_section('cloud_init_modules')
|
(_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 = initer.paths.get_ipath_cur('vendor_scripts')
|
||||||
vendor_script_fns = "%s%s/part-001" % (new_root, vendor_script)
|
vendor_script_fns = "%s%s/part-001" % (new_root, vendor_script)
|
||||||
self.assertTrue(os.path.exists(vendor_script_fns))
|
self.assertTrue(os.path.exists(vendor_script_fns))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_merging_cloud_config(self):
|
def test_merging_cloud_config(self):
|
||||||
blob = '''
|
blob = '''
|
||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
Loading…
Reference in New Issue