diff --git a/cloudinit/config/cc_bootcmd.py b/cloudinit/config/cc_bootcmd.py
index fc787aa7..6a1352d6 100644
--- a/cloudinit/config/cc_bootcmd.py
+++ b/cloudinit/config/cc_bootcmd.py
@@ -12,7 +12,7 @@
import os
from textwrap import dedent
-from cloudinit.config.schema import validate_cloudconfig_schema
+from cloudinit.config.schema import validate_cloudconfig_schema, doc_from_schema
from cloudinit.settings import PER_ALWAYS
from cloudinit import util
@@ -66,6 +66,8 @@ schema = {
}
}
+__doc__ = doc_from_schema(schema)
+
def handle(name, cfg, cloud, log, _args):
diff --git a/cloudinit/config/schema.py b/cloudinit/config/schema.py
index 16a290e2..6c4da911 100644
--- a/cloudinit/config/schema.py
+++ b/cloudinit/config/schema.py
@@ -343,6 +343,11 @@ def handle_schema_args(name, args):
print(get_schema_doc(subschema))
+def doc_from_schema(schema):
+ return '\n'.join([
+ schema['name'], "", schema['title'], "", schema['description'], ""])
+
+
def main():
"""Tool to validate schema of a cloud-config file or print schema docs."""
parser = get_parser()