Claudiu Popa b34f3b4b5d Support all the variants for writing files with cloudconfig
The patch fixes a small bug in cloudconfig._process_content, where the
chaining of encoders (gzip and base64 for instance) weren't treated
correctly. It also adds support for processing both lists of dicts and
dicts in the write-files plugin.
Also, we added tests for using !!binary| marker for yaml binary
streams, as well as a couple of other tests.

Change-Id: I9edcdcd93af4e058a0d1f8c9cdaa1b2aa9e9618d
Closes-Bug: #1409270
2015-02-11 17:36:57 +02:00

24 lines
625 B
Plaintext

Content-Type: multipart/mixed; boundary="===============1598784645116016685=="
MIME-Version: 1.0
--===============1598784645116016685==
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config"
write_files:
- encoding: b64
content: NDI=
path: {b64}
permissions: '0644'
- content: !!binary |
NDI=
path: {b64_binary}
- path: {gzip}
encoding: gzip+b64
content: H4sIAGUfoFQC/zMxAgCIsCQyAgAAAA==
- path: {gzip_binary}
encoding: gzip
content: !!binary |
H4sIAGUfoFQC/zMxAgCIsCQyAgAAAA==