diff options
author | keyz182 <keyz182@gmail.com> | 2011-05-25 11:48:41 +0100 |
---|---|---|
committer | keyz182 <keyz182@gmail.com> | 2011-05-25 11:48:41 +0100 |
commit | 25dc96dafb3ea94d4f798990bcf26825855f899b (patch) | |
tree | ab9dcb7677e13b61bb4a5531271a996a7511c5c9 /cloudinit/boto_utils.py | |
parent | 707a01fb1af5c8c493b021b782d73d01cd018ae4 (diff) | |
download | vyos-cloud-init-25dc96dafb3ea94d4f798990bcf26825855f899b.tar.gz vyos-cloud-init-25dc96dafb3ea94d4f798990bcf26825855f899b.zip |
Modified to reflect changes suggested by Scott Moser
Diffstat (limited to 'cloudinit/boto_utils.py')
-rw-r--r-- | cloudinit/boto_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/boto_utils.py b/cloudinit/boto_utils.py index 8eb7a575..e60e804d 100644 --- a/cloudinit/boto_utils.py +++ b/cloudinit/boto_utils.py @@ -60,7 +60,7 @@ def retry_url(url, retry_on_404=True): sys.stderr.write('Caught exception reading instance data, giving up\n') return '' -def get_instance_metadata(url='169.254.169.254',version='latest'): +def get_instance_metadata(version='latest',url='http://169.254.169.254/'): """ Returns the instance metadata as a nested Python dictionary. Simple values (e.g. local_hostname, hostname, etc.) will be @@ -68,11 +68,11 @@ def get_instance_metadata(url='169.254.169.254',version='latest'): be stored in the dict as a list of string values. More complex fields such as public-keys and will be stored as nested dicts. """ - url = 'http://%s/%s/meta-data/' % (url,version) + url = '%s%s/meta-data/' % (url,version) return _get_instance_metadata(url) -def get_instance_userdata(url='169.254.169.254',version='latest', sep=None): - url = 'http://%s/%s/user-data' % (url,version) +def get_instance_userdata(version='latest', sep=None,url='http://169.254.169.254/'): + url = '%s%s/user-data' % (url,version) user_data = retry_url(url, retry_on_404=False) if user_data: if sep: |