gam7 7.4.2__tar.gz → 7.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gam7 might be problematic. Click here for more details.

Files changed (107) hide show
  1. {gam7-7.4.2 → gam7-7.4.3}/PKG-INFO +1 -1
  2. {gam7-7.4.2 → gam7-7.4.3}/src/GamCommands.txt +5 -2
  3. {gam7-7.4.2 → gam7-7.4.3}/src/GamUpdate.txt +12 -0
  4. {gam7-7.4.2 → gam7-7.4.3}/src/gam/__init__.py +55 -21
  5. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glcfg.py +8 -0
  6. {gam7-7.4.2 → gam7-7.4.3}/.github/ISSUE_TEMPLATE/aa-question.md +0 -0
  7. {gam7-7.4.2 → gam7-7.4.3}/.github/ISSUE_TEMPLATE/za-bug-report.md +0 -0
  8. {gam7-7.4.2 → gam7-7.4.3}/.github/ISSUE_TEMPLATE/zz-feature-request.md +0 -0
  9. {gam7-7.4.2 → gam7-7.4.3}/.github/ISSUE_TEMPLATE.txt +0 -0
  10. {gam7-7.4.2 → gam7-7.4.3}/.github/actions/creds.tar.xz.gpg +0 -0
  11. {gam7-7.4.2 → gam7-7.4.3}/.github/actions/decrypt.sh +0 -0
  12. {gam7-7.4.2 → gam7-7.4.3}/.github/actions/entitlements.plist +0 -0
  13. {gam7-7.4.2 → gam7-7.4.3}/.github/actions/package_exclusions.txt +0 -0
  14. {gam7-7.4.2 → gam7-7.4.3}/.github/stale.yml +0 -0
  15. {gam7-7.4.2 → gam7-7.4.3}/.github/workflows/build.yml +0 -0
  16. {gam7-7.4.2 → gam7-7.4.3}/.github/workflows/codeql-analysis.yml +0 -0
  17. {gam7-7.4.2 → gam7-7.4.3}/.github/workflows/get-cacerts.yml +0 -0
  18. {gam7-7.4.2 → gam7-7.4.3}/.github/workflows/pypi.yml +0 -0
  19. {gam7-7.4.2 → gam7-7.4.3}/.pre-commit-config.yaml +0 -0
  20. {gam7-7.4.2 → gam7-7.4.3}/LICENSE +0 -0
  21. {gam7-7.4.2 → gam7-7.4.3}/README.md +0 -0
  22. {gam7-7.4.2 → gam7-7.4.3}/pyproject.toml +0 -0
  23. {gam7-7.4.2 → gam7-7.4.3}/src/.gitignore +0 -0
  24. {gam7-7.4.2 → gam7-7.4.3}/src/LICENSE +0 -0
  25. {gam7-7.4.2 → gam7-7.4.3}/src/cacerts.pem +0 -0
  26. {gam7-7.4.2 → gam7-7.4.3}/src/callgam.py +0 -0
  27. {gam7-7.4.2 → gam7-7.4.3}/src/gam/__main__.py +0 -0
  28. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/__init__.py +0 -0
  29. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/auth.py +0 -0
  30. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/client.py +0 -0
  31. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/core.py +0 -0
  32. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/data.py +0 -0
  33. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/http.py +0 -0
  34. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/http_core.py +0 -0
  35. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/http_interface.py +0 -0
  36. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/mock_http.py +0 -0
  37. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/mock_http_core.py +0 -0
  38. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/mock_service.py +0 -0
  39. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/service.py +0 -0
  40. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/token_store.py +0 -0
  41. {gam7-7.4.2 → gam7-7.4.3}/src/gam/atom/url.py +0 -0
  42. {gam7-7.4.2 → gam7-7.4.3}/src/gam/cacerts.pem +0 -0
  43. {gam7-7.4.2 → gam7-7.4.3}/src/gam/cbcm-v1.1beta1.json +0 -0
  44. {gam7-7.4.2 → gam7-7.4.3}/src/gam/contactdelegation-v1.json +0 -0
  45. {gam7-7.4.2 → gam7-7.4.3}/src/gam/datastudio-v1.json +0 -0
  46. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/__init__.py +0 -0
  47. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glaction.py +0 -0
  48. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glapi.py +0 -0
  49. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glclargs.py +0 -0
  50. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glentity.py +0 -0
  51. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glgapi.py +0 -0
  52. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glgdata.py +0 -0
  53. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glglobals.py +0 -0
  54. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glindent.py +0 -0
  55. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glmsgs.py +0 -0
  56. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glskus.py +0 -0
  57. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/gluprop.py +0 -0
  58. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/glverlibs.py +0 -0
  59. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gamlib/yubikey.py +0 -0
  60. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/__init__.py +0 -0
  61. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/alt/__init__.py +0 -0
  62. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/alt/app_engine.py +0 -0
  63. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/alt/appengine.py +0 -0
  64. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/__init__.py +0 -0
  65. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/audit/__init__.py +0 -0
  66. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/audit/service.py +0 -0
  67. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/contacts/__init__.py +0 -0
  68. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/contacts/service.py +0 -0
  69. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/apps/service.py +0 -0
  70. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/service.py +0 -0
  71. {gam7-7.4.2 → gam7-7.4.3}/src/gam/gdata/urlfetch.py +0 -0
  72. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/__init__.py +0 -0
  73. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/_auth.py +0 -0
  74. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/_helpers.py +0 -0
  75. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/channel.py +0 -0
  76. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/discovery.py +0 -0
  77. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/discovery_cache/__init__.py +0 -0
  78. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/discovery_cache/appengine_memcache.py +0 -0
  79. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/discovery_cache/base.py +0 -0
  80. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/discovery_cache/file_cache.py +0 -0
  81. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/errors.py +0 -0
  82. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/http.py +0 -0
  83. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/mimeparse.py +0 -0
  84. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/model.py +0 -0
  85. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/schema.py +0 -0
  86. {gam7-7.4.2 → gam7-7.4.3}/src/gam/googleapiclient/version.py +0 -0
  87. {gam7-7.4.2 → gam7-7.4.3}/src/gam/iso8601/__init__.py +0 -0
  88. {gam7-7.4.2 → gam7-7.4.3}/src/gam/iso8601/iso8601.py +0 -0
  89. {gam7-7.4.2 → gam7-7.4.3}/src/gam/serviceaccountlookup-v1.json +0 -0
  90. {gam7-7.4.2 → gam7-7.4.3}/src/gam/six.py +0 -0
  91. {gam7-7.4.2 → gam7-7.4.3}/src/gam-install.sh +0 -0
  92. {gam7-7.4.2 → gam7-7.4.3}/src/gam-setup.bat +0 -0
  93. {gam7-7.4.2 → gam7-7.4.3}/src/gam.exe.manifest +0 -0
  94. {gam7-7.4.2 → gam7-7.4.3}/src/gam.py +0 -0
  95. {gam7-7.4.2 → gam7-7.4.3}/src/gam.spec +0 -0
  96. {gam7-7.4.2 → gam7-7.4.3}/src/gam.wxs +0 -0
  97. {gam7-7.4.2 → gam7-7.4.3}/src/license.rtf +0 -0
  98. {gam7-7.4.2 → gam7-7.4.3}/src/project-apis.txt +0 -0
  99. {gam7-7.4.2 → gam7-7.4.3}/src/requirements-dev.txt +0 -0
  100. {gam7-7.4.2 → gam7-7.4.3}/src/requirements.txt +0 -0
  101. {gam7-7.4.2 → gam7-7.4.3}/src/setup.cfg +0 -0
  102. {gam7-7.4.2 → gam7-7.4.3}/src/setup.py +0 -0
  103. {gam7-7.4.2 → gam7-7.4.3}/src/tools/a_atleast_b.py +0 -0
  104. {gam7-7.4.2 → gam7-7.4.3}/src/tools/gen-wix-xml-filelist.py +0 -0
  105. {gam7-7.4.2 → gam7-7.4.3}/src/tools/mkGamRef.py +0 -0
  106. {gam7-7.4.2 → gam7-7.4.3}/src/tools/openssl.props +0 -0
  107. {gam7-7.4.2 → gam7-7.4.3}/src/version_info.txt.in +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.4.2
3
+ Version: 7.4.3
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -4017,16 +4017,19 @@ gam print cigroup-members [todrive <ToDriveAttribute>*]
4017
4017
  [types <CIGroupMemberTypeList>]
4018
4018
  [memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
4019
4019
  <CIGroupMembersFieldName>* [fields <CIGroupMembersFieldNameList>]
4020
- [(recursive [noduplicates])includederivedmembership] [nogroupeemail]
4020
+ [minimal|basic|full]
4021
+ [(recursive [noduplicates]) | includederivedmembership] [nogroupemail]
4021
4022
  [formatjson [quotechar <Character>]]
4022
4023
  gam show cigroup-members
4023
4024
  [(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select <GroupEntity>)]
4024
4025
  [showownedby <UserItem>]
4025
4026
  [emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
4026
4027
  [descriptionmatchpattern [not] <RegularExpression>]
4027
- [roles <GroupRoleList>] [members] [managers] [owners] [depth <Number>]
4028
+ [roles <GroupRoleList>] [members] [managers] [owners]
4028
4029
  [types <CIGroupMemberTypeList>]
4029
4030
  [memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
4031
+ [minimal|basic|full]
4032
+ [(depth <Number>) | includederivedmembership]
4030
4033
 
4031
4034
  # Cloud Identity Devices
4032
4035
 
@@ -1,3 +1,15 @@
1
+ 7.04.03
2
+
3
+ Added option `minimal|basic|full` to `gam print cigroup-members`:
4
+ * `minimal` - Fields displayed: group, id, role, email
5
+ * `basic` - Fields displayed: group, type, id, role, email
6
+ * `full` - Fields displayed: group, type, id, role, email, createTime, updateTime; this is the default
7
+
8
+ Added option `minimal|basic|full` to `gam show cigroup-members`:
9
+ * `minimal` - Fields displayed: role, email
10
+ * `basic` - Fields displayed: type, role, email
11
+ * `full` - Fields displayed: type, role, email, createTime, updateTime; this is the default
12
+
1
13
  7.04.02
2
14
 
3
15
  Improved output formatting for the following commands:
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
25
25
  """
26
26
 
27
27
  __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
28
- __version__ = '7.04.02'
28
+ __version__ = '7.04.03'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -5981,6 +5981,8 @@ def getCIGroupTransitiveMemberRoleFixType(groupName, tmember):
5981
5981
  member['type'] = Ent.TYPE_USER if not tid.endswith('.iam.gserviceaccount.com') else Ent.TYPE_SERVICE_ACCOUNT
5982
5982
  elif ttype == 'groups':
5983
5983
  member['type'] = Ent.TYPE_GROUP
5984
+ elif tid.startswith('cbcm-browser.'):
5985
+ member['type'] = Ent.TYPE_CBCM_BROWSER
5984
5986
  else:
5985
5987
  member['type'] = Ent.TYPE_OTHER
5986
5988
  else:
@@ -33959,6 +33961,8 @@ def infoGroupMembers(entityList, ciGroupsAPI=False):
33959
33961
  printKeyValueList(['type', result['type']])
33960
33962
  for field in ['createTime', 'updateTime']:
33961
33963
  printKeyValueList([field, formatLocalTime(result[field])])
33964
+ if 'deliverySetting' in result:
33965
+ printKeyValueList(['deliverySetting', result['deliverySetting']])
33962
33966
  Ind.Decrement()
33963
33967
  except (GAPI.groupNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.invalid, GAPI.forbidden) as e:
33964
33968
  entityActionFailedWarning([entityType, groupKey], str(e), j, jcount)
@@ -36121,8 +36125,9 @@ def getCIGroupTransitiveMembers(ci, groupName, membersList, i, count):
36121
36125
  return True
36122
36126
 
36123
36127
  def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, count,
36124
- memberOptions, memberDisplayOptions, level, typesSet):
36125
- printGettingAllEntityItemsForWhom(memberRoles if memberRoles else Ent.ROLE_MANAGER_MEMBER_OWNER, groupName, i, count)
36128
+ memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs):
36129
+ nameToPrint = groupEmail if groupEmail else groupName
36130
+ printGettingAllEntityItemsForWhom(memberRoles if memberRoles else Ent.ROLE_MANAGER_MEMBER_OWNER, nameToPrint, i, count)
36126
36131
  validRoles = _getCIRoleVerification(memberRoles)
36127
36132
  if memberOptions[MEMBEROPTION_INCLUDEDERIVEDMEMBERSHIP]:
36128
36133
  groupMembers = []
@@ -36137,12 +36142,11 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
36137
36142
  groupMembers = callGAPIpages(ci.groups().memberships(), 'list', 'memberships',
36138
36143
  pageMessage=getPageMessageForWhom(),
36139
36144
  throwReasons=GAPI.CIGROUP_LIST_THROW_REASONS, retryReasons=GAPI.CIGROUP_RETRY_REASONS,
36140
- parent=groupName, view='FULL',
36141
- fields='nextPageToken,memberships(*)', pageSize=GC.Values[GC.MEMBER_MAX_RESULTS])
36145
+ parent=groupName, **kwargs)
36142
36146
  except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
36143
36147
  GAPI.forbidden, GAPI.badRequest, GAPI.invalid, GAPI.invalidArgument, GAPI.systemError,
36144
36148
  GAPI.permissionDenied, GAPI.serviceNotAvailable):
36145
- entityUnknownWarning(Ent.CLOUD_IDENTITY_GROUP, groupName, i, count)
36149
+ entityUnknownWarning(Ent.CLOUD_IDENTITY_GROUP, nameToPrint, i, count)
36146
36150
  return
36147
36151
  checkCategory = memberDisplayOptions['showCategory']
36148
36152
  if not memberOptions[MEMBEROPTION_RECURSIVE]:
@@ -36176,7 +36180,7 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
36176
36180
  memberName not in membersSet):
36177
36181
  membersSet.add(memberName)
36178
36182
  member['level'] = level
36179
- member['subgroup'] = groupName
36183
+ member['subgroup'] = nameToPrint
36180
36184
  membersList.append(member)
36181
36185
  else:
36182
36186
  if memberName not in membersSet:
@@ -36185,37 +36189,40 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
36185
36189
  checkCIMemberMatch(member, memberOptions) and
36186
36190
  (not checkCategory or _checkCIMemberCategory(member, memberDisplayOptions))):
36187
36191
  member['level'] = level
36188
- member['subgroup'] = groupName
36192
+ member['subgroup'] = nameToPrint
36189
36193
  membersList.append(member)
36190
36194
  _, gname = member['name'].rsplit('/', 1)
36191
- groupMemberList.append(f'groups/{gname}')
36195
+ groupMemberList.append((f'groups/{gname}', memberName))
36192
36196
  for member in groupMemberList:
36193
- getCIGroupMembers(ci, member, memberRoles, membersList, membersSet, i, count,
36194
- memberOptions, memberDisplayOptions, level+1, typesSet)
36197
+ getCIGroupMembers(ci, member[0], memberRoles, membersList, membersSet, i, count,
36198
+ memberOptions, memberDisplayOptions, level+1, typesSet, member[1], kwargs)
36195
36199
  else:
36196
36200
  for member in groupMembers:
36197
36201
  getCIGroupMemberRoleFixType(member)
36202
+ memberName = member.get('preferredMemberKey', {}).get('id', '')
36198
36203
  if member['type'] != Ent.TYPE_GROUP:
36199
36204
  if (member['type'] in typesSet and
36200
36205
  checkCIMemberMatch(member, memberOptions) and
36201
36206
  _checkMemberRole(member, validRoles) and
36202
36207
  (not checkCategory or _checkCIMemberCategory(member, memberDisplayOptions))):
36203
36208
  member['level'] = level
36204
- member['subgroup'] = groupName
36209
+ member['subgroup'] = nameToPrint
36205
36210
  membersList.append(member)
36206
36211
  else:
36207
36212
  if (member['type'] in typesSet and
36208
36213
  checkCIMemberMatch(member, memberOptions) and
36209
36214
  (not checkCategory or _checkCIMemberCategory(member, memberDisplayOptions))):
36210
36215
  member['level'] = level
36211
- member['subgroup'] = groupName
36216
+ member['subgroup'] = nameToPrint
36212
36217
  membersList.append(member)
36213
36218
  _, gname = member['name'].rsplit('/', 1)
36214
36219
  getCIGroupMembers(ci, f'groups/{gname}', memberRoles, membersList, membersSet, i, count,
36215
- memberOptions, memberDisplayOptions, level+1, typesSet)
36220
+ memberOptions, memberDisplayOptions, level+1, typesSet, memberName, kwargs)
36216
36221
 
36217
36222
  CIGROUPMEMBERS_FIELDS_CHOICE_MAP = {
36218
36223
  'createtime': 'createTime',
36224
+ 'delivery': 'deliverySetting',
36225
+ 'deliverysettings': 'deliverySetting',
36219
36226
  'expiretime': 'expireTime',
36220
36227
  'id': 'name',
36221
36228
  'memberkey': 'preferredMemberKey',
@@ -36236,6 +36243,16 @@ CIGROUPMEMBERS_SORT_FIELDS = [
36236
36243
  ]
36237
36244
  CIGROUPMEMBERS_TIME_OBJECTS = {'createTime', 'updateTime', 'expireTime'}
36238
36245
 
36246
+ def _getCIListGroupMembersArgs(listView):
36247
+ if listView == 'full':
36248
+ return {'view': 'FULL', 'pageSize': GC.Values[GC.MEMBER_MAX_RESULTS_CI_FULL],
36249
+ 'fields': 'nextPageToken,memberships(*)'}
36250
+ if listView == 'basic':
36251
+ return {'view': 'FULL', 'pageSize': GC.Values[GC.MEMBER_MAX_RESULTS_CI_FULL],
36252
+ 'fields': 'nextPageToken,memberships(name,preferredMemberKey,roles,type)'}
36253
+ return {'view': 'BASIC', 'pageSize': GC.Values[GC.MEMBER_MAX_RESULTS_CI_BASIC],
36254
+ 'fields': 'nextPageToken,memberships(*)'}
36255
+
36239
36256
  # gam print cigroup-members [todrive <ToDriveAttribute>*]
36240
36257
  # [(cimember|ciowner <UserItem>)|(cigroup <GroupItem>)|(select <GroupEntity>)]
36241
36258
  # [showownedby <UserItem>]
@@ -36245,6 +36262,7 @@ CIGROUPMEMBERS_TIME_OBJECTS = {'createTime', 'updateTime', 'expireTime'}
36245
36262
  # [types <CIGroupMemberTypeList>]
36246
36263
  # [memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
36247
36264
  # <CIGroupMembersFieldName>* [fields <CIGroupMembersFieldNameList>]
36265
+ # [minimal|basic|full]
36248
36266
  # [(recursive [noduplicates])|includederivedmembership] [nogroupeemail]
36249
36267
  # [formatjson [quotechar <Character>]]
36250
36268
  def doPrintCIGroupMembers():
@@ -36262,6 +36280,7 @@ def doPrintCIGroupMembers():
36262
36280
  rolesSet = set()
36263
36281
  typesSet = set()
36264
36282
  matchPatterns = {}
36283
+ listView = 'full'
36265
36284
  while Cmd.ArgumentsRemaining():
36266
36285
  myarg = getArgument()
36267
36286
  if myarg == 'todrive':
@@ -36302,8 +36321,12 @@ def doPrintCIGroupMembers():
36302
36321
  memberOptions[MEMBEROPTION_RECURSIVE] = False
36303
36322
  elif myarg == 'nogroupemail':
36304
36323
  groupColumn = False
36324
+ elif myarg in {'minimal', 'basic', 'full'}:
36325
+ listView = myarg
36305
36326
  else:
36306
36327
  FJQC.GetFormatJSONQuoteChar(myarg, False)
36328
+ if listView == 'minimal' and memberOptions[MEMBEROPTION_RECURSIVE]:
36329
+ usageErrorExit(Msg.ARE_MUTUALLY_EXCLUSIVE.format('minimal', 'recursive'))
36307
36330
  if not typesSet:
36308
36331
  typesSet = {Ent.TYPE_USER} if memberOptions[MEMBEROPTION_RECURSIVE] else ALL_CIGROUP_MEMBER_TYPES
36309
36332
  fields = ','.join(set(groupFieldsLists['ci']))
@@ -36330,6 +36353,7 @@ def doPrintCIGroupMembers():
36330
36353
  if showOwnedBy:
36331
36354
  getRolesSet.add(Ent.ROLE_OWNER)
36332
36355
  getRoles = ','.join(sorted(getRolesSet))
36356
+ kwargs = _getCIListGroupMembersArgs(listView)
36333
36357
  level = 0
36334
36358
  i = 0
36335
36359
  count = len(entityList)
@@ -36356,7 +36380,7 @@ def doPrintCIGroupMembers():
36356
36380
  membersList = []
36357
36381
  membersSet = set()
36358
36382
  getCIGroupMembers(ci, groupEntity['name'], getRoles, membersList, membersSet, i, count,
36359
- memberOptions, memberDisplayOptions, level, typesSet)
36383
+ memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs)
36360
36384
  if showOwnedBy and not checkCIGroupShowOwnedBy(showOwnedBy, membersList):
36361
36385
  continue
36362
36386
  for member in membersList:
@@ -36374,6 +36398,8 @@ def doPrintCIGroupMembers():
36374
36398
  row['subgroup'] = member['subgroup']
36375
36399
  if memberDisplayOptions['showCategory']:
36376
36400
  row['category'] = member['category']
36401
+ if listView == 'minimal':
36402
+ dmember.pop('type', None)
36377
36403
  mapCIGroupMemberFieldNames(dmember)
36378
36404
  if not FJQC.formatJSON:
36379
36405
  csvPF.WriteRowTitles(flattenJSON(dmember, flattened=row, timeObjects=CIGROUPMEMBERS_TIME_OBJECTS))
@@ -36403,17 +36429,19 @@ def doPrintCIGroupMembers():
36403
36429
  # [showownedby <UserItem>]
36404
36430
  # [emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
36405
36431
  # [descriptionmatchpattern [not] <RegularExpression>]
36406
- # [roles <GroupRoleList>] [members] [managers] [owners] [depth <Number>]
36432
+ # [roles <GroupRoleList>] [members] [managers] [owners]
36407
36433
  # [internal] [internaldomains <DomainList>] [external]
36408
36434
  # [types <CIGroupMemberTypeList>]
36409
36435
  # [memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
36410
- # [includederivedmembership]
36436
+ # [minimal|basic|full]
36437
+ # [(depth <Number>) | includederivedmembership]
36411
36438
  def doShowCIGroupMembers():
36412
36439
  def _roleOrder(key):
36413
36440
  return {Ent.ROLE_OWNER: 0, Ent.ROLE_MANAGER: 1, Ent.ROLE_MEMBER: 2}.get(key, 3)
36414
36441
 
36415
36442
  def _typeOrder(key):
36416
- return {Ent.TYPE_CUSTOMER: 0, Ent.TYPE_USER: 1, Ent.TYPE_GROUP: 2, Ent.TYPE_EXTERNAL: 3}.get(key, 4)
36443
+ return {Ent.TYPE_CUSTOMER: 0, Ent.TYPE_USER: 1, Ent.TYPE_GROUP: 2,
36444
+ Ent.TYPE_CBCM_BROWSER: 3, Ent.TYPE_OTHER: 4, Ent.TYPE_EXTERNAL: 5}.get(key, 6)
36417
36445
 
36418
36446
  def _showGroup(groupName, groupEmail, depth):
36419
36447
  if includeDerivedMembership:
@@ -36424,8 +36452,7 @@ def doShowCIGroupMembers():
36424
36452
  try:
36425
36453
  membersList = callGAPIpages(ci.groups().memberships(), 'list', 'memberships',
36426
36454
  throwReasons=GAPI.CIGROUP_LIST_THROW_REASONS, retryReasons=GAPI.CIGROUP_RETRY_REASONS,
36427
- parent=groupName, view='FULL',
36428
- fields='nextPageToken,memberships(*)', pageSize=GC.Values[GC.MEMBER_MAX_RESULTS])
36455
+ parent=groupName, **kwargs)
36429
36456
  for member in membersList:
36430
36457
  getCIGroupMemberRoleFixType(member)
36431
36458
  except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
@@ -36446,7 +36473,10 @@ def doShowCIGroupMembers():
36446
36473
  if (_checkMemberRole(member, rolesSet) and
36447
36474
  member['type'] in typesSet and
36448
36475
  checkCIMemberMatch(member, memberOptions)):
36449
- memberDetails = f'{member.get("role", Ent.ROLE_MEMBER)}, {member["type"]}, {member["preferredMemberKey"]["id"]}'
36476
+ if listView != 'minimal':
36477
+ memberDetails = f'{member.get("role", Ent.ROLE_MEMBER)}, {member["type"]}, {member["preferredMemberKey"]["id"]}'
36478
+ else:
36479
+ memberDetails = f'{member.get("role", Ent.ROLE_MEMBER)}, {member["preferredMemberKey"]["id"]}'
36450
36480
  if checkCategory:
36451
36481
  memberDetails += f', {member["category"]}'
36452
36482
  for field in ['createTime', 'updateTime', 'expireTime']:
@@ -36471,6 +36501,7 @@ def doShowCIGroupMembers():
36471
36501
  matchPatterns = {}
36472
36502
  maxdepth = -1
36473
36503
  includeDerivedMembership = False
36504
+ listView = 'full'
36474
36505
  while Cmd.ArgumentsRemaining():
36475
36506
  myarg = getArgument()
36476
36507
  if myarg == 'showownedby':
@@ -36501,6 +36532,8 @@ def doShowCIGroupMembers():
36501
36532
  maxdepth = getInteger(minVal=-1)
36502
36533
  elif myarg == 'includederivedmembership':
36503
36534
  includeDerivedMembership = True
36535
+ elif myarg in {'minimal', 'basic', 'full'}:
36536
+ listView = myarg
36504
36537
  else:
36505
36538
  unknownArgumentExit()
36506
36539
  if not rolesSet:
@@ -36510,6 +36543,7 @@ def doShowCIGroupMembers():
36510
36543
  checkCategory = memberDisplayOptions['showCategory']
36511
36544
  fields = ','.join(set(groupFieldsLists['ci']))
36512
36545
  entityList = getCIGroupMembersEntityList(ci, entityList, query, subTitle, matchPatterns, groupFieldsLists['ci'], None)
36546
+ kwargs = _getCIListGroupMembersArgs(listView)
36513
36547
  i = 0
36514
36548
  count = len(entityList)
36515
36549
  for group in entityList:
@@ -179,6 +179,10 @@ LICENSE_MAX_RESULTS = 'license_max_results'
179
179
  LICENSE_SKUS = 'license_skus'
180
180
  # When retrieving lists of Google Group members from API, how many should be retrieved in each chunk
181
181
  MEMBER_MAX_RESULTS = 'member_max_results'
182
+ # CI API Group members max page size when view=BASIC
183
+ MEMBER_MAX_RESULTS_CI_BASIC = 'member_max_results_ci_basic'
184
+ # CI API Group members max page size when view=FULL
185
+ MEMBER_MAX_RESULTS_CI_FULL = 'member_max_results_ci_full'
182
186
  # When deleting or modifying Gmail messages, how many should be processed in each batch
183
187
  MESSAGE_BATCH_SIZE = 'message_batch_size'
184
188
  # When retrieving lists of Gmail messages from API, how many should be retrieved in each chunk
@@ -385,6 +389,8 @@ Defaults = {
385
389
  LICENSE_MAX_RESULTS: '100',
386
390
  LICENSE_SKUS: '',
387
391
  MEMBER_MAX_RESULTS: '200',
392
+ MEMBER_MAX_RESULTS_CI_BASIC: '1000',
393
+ MEMBER_MAX_RESULTS_CI_FULL: '500',
388
394
  MESSAGE_BATCH_SIZE: '50',
389
395
  MESSAGE_MAX_RESULTS: '500',
390
396
  MOBILE_MAX_RESULTS: '100',
@@ -550,6 +556,8 @@ VAR_INFO = {
550
556
  LICENSE_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (10, 1000)},
551
557
  LICENSE_SKUS: {VAR_TYPE: TYPE_STRING, VAR_LIMITS: (0, None)},
552
558
  MEMBER_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 200)},
559
+ MEMBER_MAX_RESULTS_CI_BASIC: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 1000)},
560
+ MEMBER_MAX_RESULTS_CI_FULL: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 500)},
553
561
  MESSAGE_BATCH_SIZE: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 1000)},
554
562
  MESSAGE_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 10000)},
555
563
  MOBILE_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 100)},
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes