Updated gam print|show browsers to handle the following error:

ERROR: 503: serviceNotAvailable - The service is currently unavailable.
This commit is contained in:
Ross Scroggs
2023-10-20 19:32:36 -07:00
parent bcf9c051f0
commit 6b19ba1933
5 changed files with 26 additions and 9 deletions

View File

@@ -2,6 +2,13 @@
Merged GAM-Team version
6.65.02
Updated `gam print|show browsers` to handle the following error:
```
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
```
6.65.01
Added option `showmimetypesize` to `gam <UserTypeEntity> print|show filecounts` and

View File

@@ -6467,6 +6467,7 @@ def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isA
result = callGAPIpages(cbcm.chromebrowsers(), 'list', 'browsers',
pageMessage=getPageMessageForWhom(),
throwReasons=[GAPI.BAD_REQUEST, GAPI.INVALID_ORGUNIT, GAPI.FORBIDDEN],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
customer=customerId, orgUnitPath=ou, projection='BASIC',
orderBy='id', sortOrder='ASCENDING', fields='nextPageToken,browsers(deviceId)')
except (GAPI.badRequest, GAPI.invalidOrgunit, GAPI.forbidden):
@@ -6489,6 +6490,7 @@ def getItemsToModify(entityType, entity, memberRoles=None, isSuspended=None, isA
result = callGAPIpages(cbcm.chromebrowsers(), 'list', 'browsers',
pageMessage=getPageMessage(),
throwReasons=[GAPI.INVALID_INPUT, GAPI.BAD_REQUEST, GAPI.RESOURCE_NOT_FOUND, GAPI.FORBIDDEN],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
customer=customerId, query=query, projection='BASIC',
orderBy='id', sortOrder='ASCENDING', fields='nextPageToken,browsers(deviceId)')
except GAPI.invalidInput:
@@ -24425,6 +24427,7 @@ def doPrintShowBrowsers():
feed = yieldGAPIpages(cbcm.chromebrowsers(), 'list', 'browsers',
pageMessage=pageMessage, messageAttribute='deviceId',
throwReasons=[GAPI.INVALID_INPUT, GAPI.BAD_REQUEST, GAPI.INVALID_ORGUNIT, GAPI.FORBIDDEN],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
customer=customerId, orgUnitPath=orgUnitPath, query=query, projection=projection,
orderBy=orderBy, sortOrder=sortOrder, fields=fields)
for browsers in feed: