summaryrefslogtreecommitdiff
path: root/cloudinit/user_data.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2013-02-23 21:23:24 -0800
committerharlowja <harlowja@virtualbox.rhel>2013-02-23 21:23:24 -0800
commiteacfc7ffbec3e6a0348ed484da895e2d2fc5ba10 (patch)
treee63c8f74a34c6250764136865c542af6ba78d989 /cloudinit/user_data.py
parent46a7a39775ed8f745ec8b63a9563f3ae6337d845 (diff)
downloadvyos-cloud-init-eacfc7ffbec3e6a0348ed484da895e2d2fc5ba10.tar.gz
vyos-cloud-init-eacfc7ffbec3e6a0348ed484da895e2d2fc5ba10.zip
Get tests working and further adjustments.
Diffstat (limited to 'cloudinit/user_data.py')
-rw-r--r--cloudinit/user_data.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py
index eaf448a7..df069ff8 100644
--- a/cloudinit/user_data.py
+++ b/cloudinit/user_data.py
@@ -59,6 +59,7 @@ EXAMINE_FOR_LAUNCH_INDEX = ["text/cloud-config"]
class UserDataProcessor(object):
def __init__(self, paths):
self.paths = paths
+ self.ssl_details = util.fetch_ssl_details(paths)
def process(self, blob):
accumulating_msg = MIMEMultipart()
@@ -172,10 +173,11 @@ class UserDataProcessor(object):
if include_once_on and os.path.isfile(include_once_fn):
content = util.load_file(include_once_fn)
else:
- resp = util.read_file_or_url(include_url)
- if include_once_on and resp.ok:
+ resp = util.read_file_or_url(include_url,
+ ssl_details=self.ssl_details)
+ if include_once_on and resp.ok():
util.write_file(include_once_fn, str(resp), mode=0600)
- if resp.ok:
+ if resp.ok():
content = str(resp)
else:
LOG.warn(("Fetching from %s resulted in"