diff options
Diffstat (limited to 'heat/engine/clients/os/nova.py')
-rw-r--r-- | heat/engine/clients/os/nova.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index 3793d2103..065fd6607 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -325,7 +325,9 @@ class NovaClientPlugin(client_plugin.ClientPlugin): subtype = os.path.splitext(filename)[0] if content is None: content = '' - msg = text.MIMEText(content, _subtype=subtype) + msg = (text.MIMEText(content, _subtype=subtype) + if subtype else text.MIMEText(content)) + msg.add_header('Content-Disposition', 'attachment', filename=filename) return msg @@ -359,7 +361,6 @@ echo -e '%s\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers (cloudinit_boothook, 'boothook.sh', 'cloud-boothook'), (read_cloudinit_file('part_handler.py'), 'part-handler.py')] - if is_cfntools: attachments.append((userdata, 'cfn-userdata', 'x-cfninitdata')) elif is_software_config: @@ -376,7 +377,7 @@ echo -e '%s\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers part.get_filename(), part.get_content_subtype())) else: - attachments.append((userdata, 'userdata', 'x-shellscript')) + attachments.append((userdata, '')) if is_cfntools: attachments.append((read_cloudinit_file('loguserdata.py'), |