summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-21 08:38:12 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-21 08:38:12 -0700
commitf1cab0d88cbcfa7eaa698db7dcc252bb6543d6c0 (patch)
tree48ecd1dc9aacdd353d2d40e8617e40b87dd47288 /cloudinit/sources
parentf7e638f6f58188cd4be1921cb045608f3c00d9c4 (diff)
downloadvyos-cloud-init-f1cab0d88cbcfa7eaa698db7dcc252bb6543d6c0.tar.gz
vyos-cloud-init-f1cab0d88cbcfa7eaa698db7dcc252bb6543d6c0.zip
1. Move all info() logging methods to debug()
2. Adjust comment on sources list from depends 3. For the /etc/timezone 'writing', add a header that says created by cloud-init
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceCloudStack.py2
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py6
-rw-r--r--cloudinit/sources/DataSourceEc2.py2
-rw-r--r--cloudinit/sources/DataSourceMAAS.py2
-rw-r--r--cloudinit/sources/DataSourceNoCloud.py2
-rw-r--r--cloudinit/sources/__init__.py22
6 files changed, 17 insertions, 19 deletions
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py
index 83c577e6..751bef4f 100644
--- a/cloudinit/sources/DataSourceCloudStack.py
+++ b/cloudinit/sources/DataSourceCloudStack.py
@@ -98,7 +98,7 @@ class DataSourceCloudStack(sources.DataSource):
timeout=timeout, status_cb=LOG.warn)
if url:
- LOG.info("Using metadata source: '%s'", url)
+ LOG.debug("Using metadata source: '%s'", url)
else:
LOG.critical(("Giving up on waiting for the metadata from %s"
" after %s seconds"),
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 9905dad4..320dd1d1 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -87,10 +87,8 @@ class DataSourceConfigDrive(sources.DataSource):
# Update interfaces and ifup only on the local datasource
# this way the DataSourceConfigDriveNet doesn't do it also.
if 'network-interfaces' in md and self.dsmode == "local":
- if md['dsmode'] == "pass":
- LOG.info("Updating network interfaces from configdrive")
- else:
- LOG.debug("Updating network interfaces from configdrive")
+ LOG.debug("Updating network interfaces from config drive (%s)",
+ md['dsmode'])
self.distro.apply_network(md['network-interfaces'])
self.seed = found
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 0598dfa2..cb460de1 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -169,7 +169,7 @@ class DataSourceEc2(sources.DataSource):
timeout=timeout, status_cb=LOG.warn)
if url:
- LOG.info("Using metadata source: '%s'", url2base[url])
+ LOG.debug("Using metadata source: '%s'", url2base[url])
else:
LOG.critical("Giving up on md from %s after %s seconds",
urls, int(time.time() - start_time))
diff --git a/cloudinit/sources/DataSourceMAAS.py b/cloudinit/sources/DataSourceMAAS.py
index 104e7a54..22c90b7c 100644
--- a/cloudinit/sources/DataSourceMAAS.py
+++ b/cloudinit/sources/DataSourceMAAS.py
@@ -128,7 +128,7 @@ class DataSourceMAAS(sources.DataSource):
headers_cb=self.md_headers)
if url:
- LOG.info("Using metadata source: '%s'", url)
+ LOG.debug("Using metadata source: '%s'", url)
else:
LOG.critical("Giving up on md from %s after %i seconds",
urls, int(time.time() - starttime))
diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py
index 8499a97c..bed500a2 100644
--- a/cloudinit/sources/DataSourceNoCloud.py
+++ b/cloudinit/sources/DataSourceNoCloud.py
@@ -152,7 +152,7 @@ class DataSourceNoCloud(sources.DataSource):
# ('local' for NoCloud, 'net' for NoCloudNet')
if ('network-interfaces' in md and
(self.dsmode in ("local", seeded_interfaces))):
- LOG.info("Updating network interfaces from %s", self)
+ LOG.debug("Updating network interfaces from %s", self)
self.distro.apply_network(md['network-interfaces'])
if md['dsmode'] == self.dsmode:
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index 42e924b0..b25724a5 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -166,7 +166,7 @@ class DataSource(object):
def find_source(sys_cfg, distro, paths, ds_deps, cfg_list, pkg_list):
ds_list = list_sources(cfg_list, ds_deps, pkg_list)
ds_names = [util.obj_name(f) for f in ds_list]
- LOG.info("Searching for data source in: %s", ds_names)
+ LOG.debug("Searching for data source in: %s", ds_names)
for cls in ds_list:
try:
@@ -188,9 +188,9 @@ def find_source(sys_cfg, distro, paths, ds_deps, cfg_list, pkg_list):
# Return an ordered list of classes that match (if any)
def list_sources(cfg_list, depends, pkg_list):
src_list = []
- LOG.info(("Looking for for data source in: %s,"
- " via packages %s that matches dependencies %s"),
- cfg_list, pkg_list, depends)
+ LOG.debug(("Looking for for data source in: %s,"
+ " via packages %s that matches dependencies %s"),
+ cfg_list, pkg_list, depends)
for ds_name in cfg_list:
if not ds_name.startswith(DS_PREFIX):
ds_name = '%s%s' % (DS_PREFIX, ds_name)
@@ -207,17 +207,17 @@ def list_sources(cfg_list, depends, pkg_list):
return src_list
-# depends is a list of dependencies (DEP_FILESYSTEM)
-# dslist is a list of 2 item lists
-# dslist = [
+# 'depends' is a list of dependencies (DEP_FILESYSTEM)
+# ds_list is a list of 2 item lists
+# ds_list = [
# ( class, ( depends-that-this-class-needs ) )
# }
-# it returns a list of 'class' that matched these deps exactly
-# it is a helper function for DataSourceCollections
-def list_from_depends(depends, dslist):
+# It returns a list of 'class' that matched these deps exactly
+# It mainly is a helper function for DataSourceCollections
+def list_from_depends(depends, ds_list):
ret_list = []
depset = set(depends)
- for (cls, deps) in dslist:
+ for (cls, deps) in ds_list:
if depset == set(deps):
ret_list.append(cls)
return ret_list