Add support for CloudStack metadata

The required information is available from an API exposed by CloudStack
on the virtual router IP address (DHCP Server).
After obtaining the IP address all the metadata is taken from the API.

Implements-Blueprint: cloudstack-metadata

Change-Id: I428860fe0e9a53649c21fcb23595b304341eb7f1
Add support for yaml user-data

CloudConfigPlugin receives information serialized into YAML format.
The information is deserialized and for each key value pair a
specialized plugin is called for processing this kind of task.

Implements-Blueprint: yaml-userdata

Change-Id: I273bc28415bc7fb37b2ef426868250ad152faec1
Fixes unicode logging decoding issue

Logging fails with an exception when unicode conversion of the message
cannot be performed.

This includes also Exception objects, where the exception message has
an unknown encoding.

The calling code should be responsible for handling the unicode encoding, but
nevertheless, the logging module should handle this scenario and not raise
an exception.

Closes-Bug: #1393870

Change-Id: Ied46e4a8715d11a3cf59d651004e17f6fe4c760b
Merge "Add support for CloudStack metadata"
Merge "Add support for yaml user-data"
Fixes encoding issue

Logging fails when using non-ASCII characters. This gives the option
of decoding the output of system calls.

Closes-Bug: #1382047
Change-Id: Ieb43b2ce4765975ee93da528ad3cb95b27d6285a
Merge "Fixes encoding issue"
Fix tests mocking bug when doing regex search

Change-Id: I7a6d8b5e111884e2c3017df82bc447ba4e99905c
Add support for EC2 config scripts

The userdatautils plugin now supports EC2 formatted scripts.
It consists of multiple batch or powershell scripts enclosed
into specific tags, where the batch part is executed before
the powershell one.

Change-Id: Ic9b2c73838c606d3eeaf039363dbdf46313379ca