mirror of
https://github.com/GAM-team/GAM.git
synced 2025-05-12 20:27:20 +00:00
Updated various chat space commands to handle service not available
This commit is contained in:
parent
7b59b648c7
commit
c4dea95f08
@ -1,3 +1,10 @@
|
|||||||
|
7.05.10
|
||||||
|
|
||||||
|
Updated various chat space commands to handle the following error:
|
||||||
|
```
|
||||||
|
ERROR: 503: serviceNotAvailable - The service is currently unavailable
|
||||||
|
```
|
||||||
|
|
||||||
7.05.09
|
7.05.09
|
||||||
|
|
||||||
Fixed bug in `gam calendars <CalendarEntity> print events matchfield attendeesstatus required accepted resource_calendar@resource.calendar.google.com`
|
Fixed bug in `gam calendars <CalendarEntity> print events matchfield attendeesstatus required accepted resource_calendar@resource.calendar.google.com`
|
||||||
|
@ -26384,6 +26384,7 @@ def printShowChatSpaces(users):
|
|||||||
bailOnInternalError=True,
|
bailOnInternalError=True,
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS)
|
fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS)
|
||||||
except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, GAPI.permissionDenied) as e:
|
except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, GAPI.permissionDenied) as e:
|
||||||
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
||||||
@ -26802,6 +26803,7 @@ def syncChatMembers(users):
|
|||||||
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
|
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
|
||||||
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, i, count, qfilter),
|
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, i, count, qfilter),
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
parent=parent, showGroups=groupsSpecified, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA)
|
parent=parent, showGroups=groupsSpecified, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA)
|
||||||
for member in members:
|
for member in members:
|
||||||
if 'member' in member:
|
if 'member' in member:
|
||||||
@ -26999,6 +27001,7 @@ def printShowChatMembers(users):
|
|||||||
bailOnInternalError=True,
|
bailOnInternalError=True,
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
||||||
**kwargsCS)
|
**kwargsCS)
|
||||||
for space in spaces:
|
for space in spaces:
|
||||||
@ -27015,6 +27018,7 @@ def printShowChatMembers(users):
|
|||||||
bailOnInternalError=True,
|
bailOnInternalError=True,
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
||||||
**kwargsCS)
|
**kwargsCS)
|
||||||
for space in spaces:
|
for space in spaces:
|
||||||
@ -27359,6 +27363,7 @@ def printShowChatMessages(users):
|
|||||||
messages = callGAPIpages(chat.spaces().messages(), 'list', 'messages',
|
messages = callGAPIpages(chat.spaces().messages(), 'list', 'messages',
|
||||||
pageMessage=_getChatPageMessage(Ent.CHAT_MESSAGE, user, i, count, qfilter),
|
pageMessage=_getChatPageMessage(Ent.CHAT_MESSAGE, user, i, count, qfilter),
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter, showDeleted=showDeleted,
|
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter, showDeleted=showDeleted,
|
||||||
fields=fields)
|
fields=fields)
|
||||||
for message in messages:
|
for message in messages:
|
||||||
@ -27476,6 +27481,7 @@ def printShowChatEvents(users):
|
|||||||
events = callGAPIpages(chat.spaces().spaceEvents(), 'list', 'spaceEvents',
|
events = callGAPIpages(chat.spaces().spaceEvents(), 'list', 'spaceEvents',
|
||||||
pageMessage=_getChatPageMessage(Ent.CHAT_EVENT, user, i, count, qfilter),
|
pageMessage=_getChatPageMessage(Ent.CHAT_EVENT, user, i, count, qfilter),
|
||||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter)
|
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter)
|
||||||
except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||||
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
_PRODUCTS = {
|
_PRODUCTS = {
|
||||||
'101001': 'Cloud Identity Free',
|
'101001': 'Cloud Identity Free',
|
||||||
'101005': 'Cloud Identity Premium',
|
'101005': 'Cloud Identity Premium',
|
||||||
|
'101007': 'Google Workspace for Education',
|
||||||
'101031': 'Google Workspace for Education',
|
'101031': 'Google Workspace for Education',
|
||||||
'101033': 'Google Voice',
|
'101033': 'Google Voice',
|
||||||
'101034': 'Google Workspace Archived User',
|
'101034': 'Google Workspace Archived User',
|
||||||
@ -47,6 +48,10 @@ _SKUS = {
|
|||||||
'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
|
'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
|
||||||
'1010050001': {
|
'1010050001': {
|
||||||
'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'},
|
'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'},
|
||||||
|
'1010070001': {
|
||||||
|
'product': '101007', 'aliases': ['gwef', 'workspaceeducationfundamentals'], 'displayName': 'Google Workspace for Education Fundamentals'},
|
||||||
|
'1010070004': {
|
||||||
|
'product': '101007', 'aliases': ['gwegmo', 'workspaceeducationgmailonly'], 'displayName': 'Google Workspace for Education Gmail Only'},
|
||||||
'1010310002': {
|
'1010310002': {
|
||||||
'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
|
'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
|
||||||
'1010310003': {
|
'1010310003': {
|
||||||
@ -111,6 +116,8 @@ _SKUS = {
|
|||||||
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
|
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
|
||||||
'Google-Apps-For-Business': {
|
'Google-Apps-For-Business': {
|
||||||
'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'},
|
'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'},
|
||||||
|
'Google-Apps-For-Education': {
|
||||||
|
'product': 'Google-Apps', 'aliases': ['gafe', 'gsuiteeducation', 'gsuiteedu'], 'displayName': 'Google Workspace for Education - Fundamentals'},
|
||||||
'Google-Apps-For-Government': {
|
'Google-Apps-For-Government': {
|
||||||
'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
|
'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
|
||||||
'Google-Apps-For-Postini': {
|
'Google-Apps-For-Postini': {
|
||||||
@ -148,6 +155,8 @@ _SKUS = {
|
|||||||
'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
|
'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
|
||||||
'1010340006': {
|
'1010340006': {
|
||||||
'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'},
|
'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'},
|
||||||
|
'1010340007': {
|
||||||
|
'product': '101034', 'aliases': ['gwefau', 'gwefarchived', 'workspaceeducationfundamentalsarchived'], 'displayName': 'Google Workspace for Education Fundamentals - Archived User'},
|
||||||
'1010060001': {
|
'1010060001': {
|
||||||
'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
|
'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
|
||||||
'd4e', 'driveenterprise', 'drive4enterprise',
|
'd4e', 'driveenterprise', 'drive4enterprise',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user