summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2015-02-17 16:33:23 +0000
committerDaniel Watkins <daniel.watkins@canonical.com>2015-02-17 16:33:23 +0000
commite01795dac74cd31bd6054e3185c2dba6203690ca (patch)
tree4a3b6eb0a455d1cca838dad56fa505311d335aa0 /cloudinit/sources
parente626359a6ea47880f0c17add03502513ee3a6792 (diff)
downloadvyos-cloud-init-e01795dac74cd31bd6054e3185c2dba6203690ca.tar.gz
vyos-cloud-init-e01795dac74cd31bd6054e3185c2dba6203690ca.zip
Add explanatory comment.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceCloudStack.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py
index 0377d940..5eda10a5 100644
--- a/cloudinit/sources/DataSourceCloudStack.py
+++ b/cloudinit/sources/DataSourceCloudStack.py
@@ -132,6 +132,9 @@ class DataSourceCloudStack(sources.DataSource):
def get_password(self):
def _do_request(req_string):
+ # We have to provide a valid HTTP request, but a valid HTTP
+ # response is not returned. This means that getresponse() chokes,
+ # so we use the socket directly to read off the password.
conn = http_client.HTTPConnection(self.vr_addr, 8080)
conn.request('GET', '', headers={'DomU_Request': req_string})
output = conn.sock.recv(1024).decode('utf-8').strip()