summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_debug.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-10-29 19:36:57 -0400
committerScott Moser <smoser@ubuntu.com>2014-10-29 19:36:57 -0400
commit9eed0fef5030e2e66f4bc1e549783638087786f4 (patch)
tree2fde82594c6e3932ed5c1bb57ea9297ee1f5655d /cloudinit/config/cc_debug.py
parentc634d32173fb09ff33896f3b03e495fada80dd33 (diff)
parent24e6ef998899418d73a63a64141fbaa209320967 (diff)
downloadvyos-cloud-init-9eed0fef5030e2e66f4bc1e549783638087786f4.tar.gz
vyos-cloud-init-9eed0fef5030e2e66f4bc1e549783638087786f4.zip
Start adding cloud config module docs.
Add the basics of docs that can be extracted from the code itself (also impose a initial format that will be useful for further modules to follow). In this initial addition modify the cc_debug.py and cc_ubuntu_init_switch.py to use this new style. LP: #1383510
Diffstat (limited to 'cloudinit/config/cc_debug.py')
-rw-r--r--cloudinit/config/cc_debug.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/cloudinit/config/cc_debug.py b/cloudinit/config/cc_debug.py
index 7219b0f8..a3af4500 100644
--- a/cloudinit/config/cc_debug.py
+++ b/cloudinit/config/cc_debug.py
@@ -14,6 +14,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+**Summary:** helper to debug cloud-init *internal* datastructures.
+
+**Description:** This module will enable for outputting various internal
+information that cloud-init sources provide to either a file or to the output
+console/log location that this cloud-init has been configured with when
+running.
+
+It can be configured with the following option structure::
+
+ debug:
+ verbose: (defaulting to true)
+ output: (location to write output, defaulting to console + log)
+
+.. note::
+
+ Log configurations are not output.
+"""
+
from cloudinit import type_utils
from cloudinit import util
import copy
@@ -32,6 +51,8 @@ def _make_header(text):
def handle(name, cfg, cloud, log, args):
+ """Handler method activated by cloud-init."""
+
verbose = util.get_cfg_by_path(cfg, ('debug', 'verbose'), default=True)
if args:
# if args are provided (from cmdline) then explicitly set verbose