summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorkeyz182 <keyz182@gmail.com>2011-05-25 16:42:04 +0100
committerkeyz182 <keyz182@gmail.com>2011-05-25 16:42:04 +0100
commit6bdaa810dd02c63b6c560c0283bf375716ff6ad0 (patch)
treeefe6c461ebf6327c753538777ef8e8886bebb5f4 /cloudinit
parenta0ea36906c02faa26a764aaefc4aafb3fc0f65f4 (diff)
downloadvyos-cloud-init-6bdaa810dd02c63b6c560c0283bf375716ff6ad0.tar.gz
vyos-cloud-init-6bdaa810dd02c63b6c560c0283bf375716ff6ad0.zip
Fixed silly mistake self.metadata_address instead of metadata_address. D'oh.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/DataSourceEc2.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py
index 2e7eb2a7..e90c29b7 100644
--- a/cloudinit/DataSourceEc2.py
+++ b/cloudinit/DataSourceEc2.py
@@ -47,8 +47,8 @@ class DataSourceEc2(DataSource.DataSource):
try:
if not self.wait_for_metadata_service():
return False
- self.userdata_raw = boto_utils.get_instance_userdata(self.api_ver,None,metadata_address)
- self.metadata = boto_utils.get_instance_metadata(self.api_ver,metadata_address)
+ self.userdata_raw = boto_utils.get_instance_userdata(self.api_ver,None,self.metadata_address)
+ self.metadata = boto_utils.get_instance_metadata(self.api_ver,self.metadata_address)
return True
except Exception as e:
print e
@@ -119,8 +119,9 @@ class DataSourceEc2(DataSource.DataSource):
req = urllib2.Request(url)
resp = urllib2.urlopen(req, timeout=timeout)
if resp.read() != "":
- metadata_address = host
+ self.metadata_address = host
return True
+ log.info("Using $s for metadata" % self.metadata_address)
reason = "empty data [%s]" % resp.getcode()
except urllib2.HTTPError as e:
reason = "http error [%s]" % e.code