Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IMDSv2 for autodiscovering EC2 region #5207

Merged
merged 3 commits into from
May 18, 2020

Conversation

vz10
Copy link
Contributor

@vz10 vz10 commented May 15, 2020

Issue #, if available: #4976

Description of changes:
Use IMDSv2, if it supported by instance, for auto-discovering EC2 region

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vz10 vz10 requested a review from stealthycoin May 15, 2020 23:36
Copy link
Contributor

@stealthycoin stealthycoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one minor comment.

@@ -27,6 +27,17 @@
from awscli.clidriver import create_clidriver


class RegionCapture(object):
def __init__(self):
self._region = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this public since we are accessing it from outside the class (in the test).

@vz10 vz10 force-pushed the imdsv2_for_ec2_region_detect branch from 913bf46 to cd008a7 Compare May 18, 2020 21:59
@codecov-io
Copy link

Codecov Report

Merging #5207 into v2 will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##               v2    #5207   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files         232      232           
  Lines       17564    17565    +1     
=======================================
+ Hits        16579    16580    +1     
  Misses        985      985           
Impacted Files Coverage Δ
awscli/utils.py 95.87% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c047072...cd008a7. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants