Merge ~oddbloke/cloud-init/+git/cloud-init:doc into cloud-init:master

Proposed by Dan Watkins
Status: Merged
Approved by: Chad Smith
Approved revision: 4c0febefdac03b08111efa81d6eebf0d199bc9d0
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~oddbloke/cloud-init/+git/cloud-init:doc
Merge into: cloud-init:master
Diff against target: 68 lines (+13/-12)
1 file modified
doc/rtd/topics/format.rst (+13/-12)
Reviewer Review Type Date Requested Status
Chad Smith Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+371461@code.launchpad.net

Commit message

format.rst: add text/jinja2 to list of content types (+ cleanups)

The cleanups, specifically, are to sort the list of content types, and
remove trailing whitespace.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:4c0febefdac03b08111efa81d6eebf0d199bc9d0
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1057/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1057//rebuild

review: Approve (continuous-integration)
Revision history for this message
Chad Smith (chad.smith) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/doc/rtd/topics/format.rst b/doc/rtd/topics/format.rst
2index 15234d2..74d1fee 100644
3--- a/doc/rtd/topics/format.rst
4+++ b/doc/rtd/topics/format.rst
5@@ -23,14 +23,15 @@ For example, both a user data script and a cloud-config type could be specified.
6
7 Supported content-types:
8
9-- text/x-include-once-url
10-- text/x-include-url
11-- text/cloud-config-archive
12-- text/upstart-job
13+- text/cloud-boothook
14 - text/cloud-config
15+- text/cloud-config-archive
16+- text/jinja2
17 - text/part-handler
18+- text/upstart-job
19+- text/x-include-once-url
20+- text/x-include-url
21 - text/x-shellscript
22-- text/cloud-boothook
23
24 Helper script to generate mime messages
25 ---------------------------------------
26@@ -38,16 +39,16 @@ Helper script to generate mime messages
27 .. code-block:: python
28
29 #!/usr/bin/python
30-
31+
32 import sys
33-
34+
35 from email.mime.multipart import MIMEMultipart
36 from email.mime.text import MIMEText
37-
38+
39 if len(sys.argv) == 1:
40 print("%s input-file:type ..." % (sys.argv[0]))
41 sys.exit(1)
42-
43+
44 combined_message = MIMEMultipart()
45 for i in sys.argv[1:]:
46 (filename, format_type) = i.split(":", 1)
47@@ -56,7 +57,7 @@ Helper script to generate mime messages
48 sub_message = MIMEText(contents, format_type, sys.getdefaultencoding())
49 sub_message.add_header('Content-Disposition', 'attachment; filename="%s"' % (filename))
50 combined_message.attach(sub_message)
51-
52+
53 print(combined_message)
54
55
56@@ -78,10 +79,10 @@ Example
57 ::
58
59 $ cat myscript.sh
60-
61+
62 #!/bin/sh
63 echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt
64-
65+
66 $ euca-run-instances --key mykey --user-data-file myscript.sh ami-a07d95c9
67
68 Include File

Subscribers

People subscribed via source and target branches