summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/__init__.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-17 15:30:04 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-17 15:30:04 -0500
commit605335f4732246ef89b94dcc542e73f13fdef1c9 (patch)
tree7e0ac9e33408102a04342db5b54ee0a520ef64ec /cloudinit/handlers/__init__.py
parent98fd17c55b637f4e1d136c954567c1d9b23e6c20 (diff)
parent1729b161c7569ec60ac6102a046e0b8c22457b7c (diff)
downloadvyos-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/handlers/__init__.py')
-rw-r--r--cloudinit/handlers/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index 2ddc75f4..059d7495 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -187,6 +187,10 @@ def _escape_string(text):
def walker_callback(data, filename, payload, headers):
content_type = headers['Content-Type']
+ if content_type in data.get('excluded'):
+ LOG.debug('content_type "%s" is excluded', content_type)
+ return
+
if content_type in PART_CONTENT_TYPES:
walker_handle_handler(data, content_type, filename, payload)
return