diff options
author | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
---|---|---|
committer | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
commit | 575a084808db7d5ac607a848b018abe676e73a91 (patch) | |
tree | 34e179b0623074e6cd6fc03e4b3db001f8e493bf /cloudinit/ec2_utils.py | |
parent | 9dfb60d3144860334ab1ad1d72920d962139461f (diff) | |
parent | d4886b65549c886499141872a9928412a74bbea2 (diff) | |
download | vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.tar.gz vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.zip |
Update to code on trunk.
Diffstat (limited to 'cloudinit/ec2_utils.py')
-rw-r--r-- | cloudinit/ec2_utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cloudinit/ec2_utils.py b/cloudinit/ec2_utils.py index 026ee178..4812eccb 100644 --- a/cloudinit/ec2_utils.py +++ b/cloudinit/ec2_utils.py @@ -135,8 +135,8 @@ class MetadataMaterializer(object): return joined -def get_instance_userdata(url, version='latest', ssl_details=None): - ud_url = combine_url(url, version) +def get_instance_userdata(api_version, metadata_address, ssl_details=None): + ud_url = combine_url(metadata_address, api_version) ud_url = combine_url(ud_url, 'user-data') try: response = util.read_file_or_url(ud_url, ssl_details=ssl_details) @@ -145,9 +145,8 @@ def get_instance_userdata(url, version='latest', ssl_details=None): util.logexc(LOG, "Failed fetching userdata from url %s", ud_url) return None - -def get_instance_metadata(url, version='latest', ssl_details=None): - md_url = combine_url(url, version) +def get_instance_metadata(api_version, metadata_address, ssl_details=None): + md_url = combine_url(metadata_address, api_version) md_url = combine_url(md_url, 'meta-data') try: response = util.read_file_or_url(md_url, ssl_details=ssl_details) |