-
Notifications
You must be signed in to change notification settings - Fork 431
Factor metadata interface into a separate module #520
Conversation
'instance/service-accounts/default/') | ||
META = _METADATA_ROOT + 'token' | ||
_DEFAULT_EMAIL_METADATA = _METADATA_ROOT + 'email' | ||
# Backwards Compat |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if not http_request: | ||
http_request = self._client.request | ||
|
||
r_string = '/?recursive=true' if recursive else '' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jonparrott Things are green now. PTAL. =) |
@@ -105,6 +73,8 @@ def __init__(self, scope='', **kwargs): | |||
# Assertion type is no longer used, but still in the | |||
# parent class signature. | |||
super(AppAssertionCredentials, self).__init__(None) | |||
|
|||
# Cache until Metadata Server supports Cache-Control 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.
|
||
|
||
def get_service_account_info(service_account='default', http_request=None): | ||
""" Get information about a service account from the metadata server. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jonparrott Not sure if you get notifications when I push... so bump. |
http_request = httplib2.Http().request | ||
|
||
if kwargs: | ||
path.append('?' + urlencode(kwargs)) |
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.
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@googlebot I confirm |
@googlebot we're going to deactivate you. |
Merging, @nathanielmanistaatgoogle if you have any objections here we can address before we release this code. |
First in a series of PRs which are loosely based on #476
Realized that Metadata Server interaction should be decoupled from GCE App Assertion Credentials.
gce.AppAssertionCredentials
.