diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-17 15:30:04 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-17 15:30:04 -0500 |
commit | 605335f4732246ef89b94dcc542e73f13fdef1c9 (patch) | |
tree | 7e0ac9e33408102a04342db5b54ee0a520ef64ec /cloudinit/user_data.py | |
parent | 98fd17c55b637f4e1d136c954567c1d9b23e6c20 (diff) | |
parent | 1729b161c7569ec60ac6102a046e0b8c22457b7c (diff) | |
download | vyos-cloud-init-605335f4732246ef89b94dcc542e73f13fdef1c9.tar.gz vyos-cloud-init-605335f4732246ef89b94dcc542e73f13fdef1c9.zip |
initial vendordata support
This adds the ability for a datasource to provide "vendordata".
The difference here is that vendordata is from the vendor (cloud provider)
where user-data is from the user. By enabling this channel, the vendor
can have input on how the instance is set up without modifying or needing
to understand the user-data.
vendordata is generally consumed exactly like user-data, but the user
has the ability to disable its consumption.
The only datasource supporting this at the moment is SmartOS.
Diffstat (limited to 'cloudinit/user_data.py')
-rw-r--r-- | cloudinit/user_data.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py index d49ea094..3032ef70 100644 --- a/cloudinit/user_data.py +++ b/cloudinit/user_data.py @@ -88,7 +88,11 @@ class UserDataProcessor(object): def process(self, blob): accumulating_msg = MIMEMultipart() - self._process_msg(convert_string(blob), accumulating_msg) + if isinstance(blob, list): + for b in blob: + self._process_msg(convert_string(b), accumulating_msg) + else: + self._process_msg(convert_string(blob), accumulating_msg) return accumulating_msg def _process_msg(self, base_msg, append_msg): |