eucalyptus/eutester — pull request #161 by hspencer77 (2013-07-15 11:29:22+00:00)
Title: Added testcase and support for testing userdata

Added the following:

* Testcase in instancetest.py for testing and confirming userdata in supported [cloud-init formats](https://cloudinit.readthedocs.org/en/latest/topics/format.html) (which AWS supports and uses)
* Added get_userdata method to class EuInstance
* Per [AWS RunInstances API spec](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html), added support for passing user data as a Base64-encoded MIME string.

```
UserData
The Base64-encoded MIME user data to be made available to the instances in this reservation.
Type: String
Default: None
Required: No
```

Strings and files were tested when confirming fix.

Example strings tested are as follows:

```
"Hello World\!"
"Content-Type: text/cloud-config disable_root: false"
```

Example file formats used to confirm testcase and fix are as follows:

```
../user-data-tests/cloud-init.config: ASCII text
../user-data-tests/include-once.txt: ASCII English text
../user-data-tests/include.txt: ASCII C program text
../user-data-tests/part-handler.txt: Python script text executable
../user-data-tests/part-handler-v2.txt: Python script text executable
../user-data-tests/plain-ignored.txt: ASCII English text
../user-data-tests/upstart-cloud-config.txt: ASCII text
../user-data-tests/upstart-rclocal.txt: ASCII text
../user-data-tests/userdata.txt: gzip compressed data, was "userdata.txt", last modified: Sat Jul 13 00:09:42 2013, max compression
../user-data-tests/user-script.txt: POSIX shell script text executable
```