-
Notifications
You must be signed in to change notification settings - Fork 430
Use transport module for GCE environment check. #612
Conversation
_GCE_METADATA_HOST = '169.254.169.254' | ||
_METADATA_FLAVOR_HEADER = 'Metadata-Flavor' | ||
_GCE_METADATA_URI = 'http://169.254.169.254' | ||
_METADATA_FLAVOR_HEADER = 'metadata-flavor' # lowercase header |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@nathanielmanistaatgoogle PTAL I pushed a 2nd commit with some of the changes you suggest (see my responses for the changes I didn't make). I also removed a no-longer relevant TODO (about separation from |
connection = six.moves.http_client.HTTPConnection( | ||
_GCE_METADATA_HOST, timeout=GCE_METADATA_TIMEOUT) | ||
|
||
http = transport.get_http_object(timeout=GCE_METADATA_TIMEOUT) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM for now. |
@jonparrott Can you think of any reason that this wouldn't have been the original implementation? @nathanielmanistaatgoogle Any issues? |
I'm not sure, I didn't write the original environment check. /shruggie |
Got heem |
3eb4077
to
2a76227
Compare
@nathanielmanistaatgoogle PTAL. Pretty please remind me to squash in your LGTM. (@jonparrott is there no such thing as a squash-bot / remind-bot service for GitHub?) |
@dhermes what would you want it to do? |
Block a merge until commits with the word |
I could probably add that to @dpebot once he's functional. |
Ha awesome! |
Change content looks good; squash and merge. |
Fixes #599.