Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Allow customizing the GCE metadata service address via an env var. #704

Merged
merged 1 commit into from
Mar 27, 2017

Conversation

craigcitro
Copy link
Contributor

The goal here is to make it possible for a user of a binary that depends on
this library (eg the google cloud SDK) to be able to customize where it looks
for the GCE metadata service. (An adventurous user can already customize the
GCE metadata service location via the existing global vars in this library.)

The only bit of awkwardness here is really the test: since this is a top-level
statement, reloading is the only way to ensure it works.

PTAL @jonparrott @dhermes

@craigcitro
Copy link
Contributor Author

(Travis issues seem pre-existing, but I think that's well-known. 😛 )

@craigcitro
Copy link
Contributor Author

(small update squashed in: reload is apparently no longer top-level in python3!)

@craigcitro
Copy link
Contributor Author

(and another for some 2-space vs. 4-space indentation)

The goal here is to make it possible for a user of a binary that depends on
this library (eg the google cloud SDK) to be able to customize where it looks
for the GCE metadata service. (An adventurous user can already customize the
GCE metadata service location via the existing global vars in this library.)

The only bit of awkwardness here is really the test: since this is a top-level
statement, reloading is the only way to ensure it works.
@craigcitro
Copy link
Contributor Author

(rebased so i can feel good about seeing green)

@theacodes theacodes merged commit feec15f into googleapis:master Mar 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants