mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Cleanup (#1066)
* Cleanup gam,py: In show sakays, only mark USER-MANAGED keys as current: true/false gapi/__init__.py: pylint cleanup: import order, indentation gapi/errors.py: pylint cleanup: import order, unused import, indentation Recognize 502 Bad Gateway/Gateway Timeout: treat as retryable errors This last change does not directly handle the refresh problem in Issue #1063 but in my version this seems to be the right solution to the 502 gateways errors * In show sakeys, indicate whcij key was used to authenticate * Show all sakeys by default * Include unused import * Remove unused import, fix unit tests
This commit is contained in:
@@ -7840,7 +7840,7 @@ def _formatOAuth2ServiceData(private_key, private_key_id):
|
||||
|
||||
def doShowServiceAccountKeys():
|
||||
iam = buildGAPIServiceObject('iam', None)
|
||||
keyTypes = 'USER_MANAGED'
|
||||
keyTypes = None
|
||||
i = 3
|
||||
while i < len(sys.argv):
|
||||
myarg = sys.argv[i].lower().replace('_', '')
|
||||
@@ -7867,7 +7867,8 @@ def doShowServiceAccountKeys():
|
||||
print('{0}: {1}'.format(parts[i][:-1], parts[i+1]))
|
||||
for key in keys:
|
||||
key['name'] = key['name'].rsplit('/', 1)[-1]
|
||||
key['current'] = key['name'] == currentPrivateKeyId
|
||||
if key['name'] == currentPrivateKeyId:
|
||||
key['usedToAuthenticateThisRequest'] = True
|
||||
print_json(None, keys)
|
||||
|
||||
def doRotateServiceAccountKeys():
|
||||
|
||||
Reference in New Issue
Block a user