Compare commits

...

6 Commits

Author SHA1 Message Date
Ross Scroggs
fce8704f87 Fixed bugs/cleaned output in gam info|print cros
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-05-29 17:38:53 -07:00
Ross Scroggs
4d3b72900b Fixed bugs/cleaned output in gam info|print cros. 2025-05-29 17:17:33 -07:00
Ross Scroggs
fd81d56675 Fixed bugs/cleaned output in gam info|print cros. 2025-05-29 17:17:05 -07:00
Ross Scroggs
762d8479a4 Added chromeostype, diskspaceusage and faninfo to <CrOSFieldName> 2025-05-29 09:36:36 -07:00
Ross Scroggs
6f19ec4f8c Update Vault-Takeout.md
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-05-28 14:56:28 -07:00
Ross Scroggs
8af3bc60e6 Added option shareddrivesoption included|included_if_account_is_not_a_member|not_included to gam create vaultexport. 2025-05-28 14:28:38 -07:00
8 changed files with 87 additions and 35 deletions

View File

@@ -2396,12 +2396,14 @@ gam <CrOSTypeEntity> update <CrOSAttribute>+ [quickcrosmove [<Boolean>]] [nobatc
autoupdatethrough|
backlightinfo|
bootmode|
chromeostype|
cpuinfo|
cpustatusreports|
deprovisionreason|
devicefiles|
deviceid|
devicelicensetype|
diskspaceusage|
diskvolumereports|
dockmacaddress|
ethernetmacaddress|
@@ -2409,6 +2411,7 @@ gam <CrOSTypeEntity> update <CrOSAttribute>+ [quickcrosmove [<Boolean>]] [nobatc
extendedsupporteligible|
extendedsupportstart|
extendedsupportenabled|
faninfo|
firmwareversion|
firstenrollmenttime|
lastdeprovisiontimestamp|

View File

@@ -1,8 +1,14 @@
7.07.16
Added `chromeostype`, `diskspaceusage` and `faninfo` to `<CrOSFieldName>` for use in `gam info|print cros`.
Fixed bugs/cleaned output in `gam info|print cros`.
7.07.15
Added option `shareddrivesoption included|included_if_account_is_not_a_member|not_included` to `gam create vaultexport`.
The previous option 'includeshareddrives <Boolean>` is mapped as follows:
The previous option `includeshareddrives <Boolean>` is mapped as follows:
* `includeshareddrives false` - `shareddrivesoption included_if_account_is_not_a_member`
* `includeshareddrives true` - `shareddrivesoption included`

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.07.15'
__version__ = '7.07.16'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -23759,12 +23759,14 @@ CROS_FIELDS_CHOICE_MAP = {
'autoupdatethrough': 'autoUpdateThrough',
'backlightinfo': 'backlightInfo',
'bootmode': 'bootMode',
'chromeostype': 'chromeOsType',
'cpuinfo': 'cpuInfo',
'cpustatusreports': 'cpuStatusReports',
'deprovisionreason': 'deprovisionReason',
'devicefiles': ['deviceFiles.type', 'deviceFiles.createTime'],
'deviceid': 'deviceId',
'devicelicensetype': 'deviceLicenseType',
'diskspaceusage': 'diskSpaceUsage',
'diskvolumereports': 'diskVolumeReports',
'dockmacaddress': 'dockMacAddress',
'ethernetmacaddress': 'ethernetMacAddress',
@@ -23772,6 +23774,7 @@ CROS_FIELDS_CHOICE_MAP = {
'extendedsupporteligible': 'extendedSupportEligible',
'extendedsupportstart': 'extendedSupportStart',
'extendedsupportenabled': 'extendedSupportEnabled',
'faninfo': 'fanInfo',
'firmwareversion': 'firmwareVersion',
'firstenrollmenttime': 'firstEnrollmentTime',
'lastdeprovisiontimestamp': 'lastDeprovisionTimestamp',
@@ -23819,6 +23822,7 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
'notes',
'serialNumber',
'status',
'chromeOsType',
'deviceLicenseType',
'model',
'firmwareVersion',
@@ -23839,6 +23843,7 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
'manufactureDate',
'supportEndDate',
'autoUpdateExpiration',
'autoUpdateThrough',
'willAutoRenew',
]
@@ -23863,8 +23868,11 @@ CROS_TIME_OBJECTS = {
'lastDeprovisionTimestamp',
'lastEnrollmentTime',
'lastSync',
'rebootTime',
'reportTime',
'supportEndDate',
'updateTime',
'updateCheckTime',
}
CROS_FIELDS_WITH_CRS_NLS = {'notes'}
CROS_START_ARGUMENTS = ['start', 'startdate', 'oldestdate']
@@ -23981,13 +23989,13 @@ def infoCrOSDevices(entityList):
printKeyValueWithCRsNLs(up, cros[up])
else:
printKeyValueList([up, formatLocalTime(cros[up])])
up = 'tpmVersionInfo'
if up in cros:
printKeyValueList([up, ''])
Ind.Increment()
for key, value in sorted(iter(cros[up].items())):
printKeyValueList([key, value])
Ind.Decrement()
for up in ['diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo']:
if up in cros:
printKeyValueList([up, ''])
Ind.Increment()
for key, value in sorted(iter(cros[up].items())):
printKeyValueList([key, value])
Ind.Decrement()
if not noLists:
activeTimeRanges = _filterActiveTimeRanges(cros, True, listLimit, startDate, endDate, activeTimeRangesOrder)
if activeTimeRanges:
@@ -24041,6 +24049,9 @@ def infoCrOSDevices(entityList):
entityActionNotPerformedWarning([Ent.CROS_DEVICE, deviceId, Ent.DEVICE_FILE, downloadfile],
Msg.NO_ENTITIES_FOUND.format(Ent.Plural(Ent.DEVICE_FILE)), i, count)
Act.Set(Act.INFO)
cpuInfo = _filterBasicList(cros, 'cpuInfo', True, listLimit)
if cpuInfo:
showJSON('cpuInfo', cpuInfo, dictObjectsKey={'cpuInfo': 'model'})
cpuStatusReports = _filterCPUStatusReports(cros, True, listLimit, startTime, endTime)
if cpuStatusReports:
printKeyValueList(['cpuStatusReports'])
@@ -24058,6 +24069,12 @@ def infoCrOSDevices(entityList):
printKeyValueList(['cpuUtilizationPercentageInfo', cpuStatusReport['cpuUtilizationPercentageInfo']])
Ind.Decrement()
Ind.Decrement()
backlightInfo = _filterBasicList(cros, 'backLightInfo', True, listLimit)
if backlightInfo:
showJSON('backlightInfo', backlightInfo, dictObjectsKey={'backlightInfo': 'path'})
fanInfo = _filterBasicList(cros, 'fanInfo', True, listLimit)
if fanInfo:
showJSON('fanInfo', fanInfo)
diskVolumeReports = _filterBasicList(cros, 'diskVolumeReports', True, listLimit)
if diskVolumeReports:
printKeyValueList(['diskVolumeReports'])
@@ -24284,7 +24301,7 @@ CROS_ENTITIES_MAP = {
}
CROS_INDEXED_TITLES = ['activeTimeRanges', 'recentUsers', 'deviceFiles',
'cpuStatusReports', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports']
'cpuStatusReports', 'cpuInfo', 'backlightInfo', 'fanInfo', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports']
# gam print cros [todrive <ToDriveAttribute>*]
# [(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime<String> <Time>]
@@ -24331,12 +24348,15 @@ def doPrintCrOSDevices(entityList=None):
if not noLists and not selectedLists:
csvPF.WriteRowTitles(flattenJSON(cros, listLimit=listLimit, timeObjects=CROS_TIME_OBJECTS))
return
attrib = 'tpmVersionInfo'
if attrib in cros:
for key, value in sorted(iter(cros[attrib].items())):
attribKey = f'{attrib}{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{key}'
cros[attribKey] = value
cros.pop(attrib)
for attrib in ['diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo']:
if attrib in cros:
for key, value in sorted(iter(cros[attrib].items())):
attribKey = f'{attrib}{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{key}'
if key not in CROS_TIME_OBJECTS:
cros[attribKey] = value
else:
cros[attribKey] = formatLocalTime(value)
cros.pop(attrib)
activeTimeRanges = _filterActiveTimeRanges(cros, selectedLists.get('activeTimeRanges', False), listLimit, startDate, endDate, activeTimeRangesOrder)
recentUsers = _filterRecentUsers(cros, selectedLists.get('recentUsers', False), listLimit)
deviceFiles = _filterDeviceFiles(cros, selectedLists.get('deviceFiles', False), listLimit, startTime, endTime)
@@ -24350,8 +24370,10 @@ def doPrintCrOSDevices(entityList=None):
return
row = {}
for attrib in cros:
if attrib not in {'kind', 'etag', 'tpmVersionInfo', 'recentUsers', 'activeTimeRanges',
'deviceFiles', 'cpuStatusReports', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports'}:
if attrib in {'cpuInfo', 'backlightInfo', 'fanInfo'}:
flattenJSON({attrib: cros[attrib]}, flattened=row)
elif attrib not in {'kind', 'etag', 'diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo', 'activeTimeRanges', 'recentUsers',
'deviceFiles', 'cpuStatusReports', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports'}:
if attrib not in CROS_TIME_OBJECTS:
row[attrib] = cros[attrib]
else:

View File

@@ -106,12 +106,14 @@ The second form is backwards compatible with Legacy GAM and selection with `<CrO
autoupdatethrough|
backlightinfo|
bootmode|
chromeostype|
cpuinfo|
cpustatusreports|
deprovisionreason|
devicefiles|
deviceid|
devicelicensetype|
diskspaceusage|
diskvolumereports|
dockmacaddress|
ethernetmacaddress|
@@ -119,6 +121,7 @@ The second form is backwards compatible with Legacy GAM and selection with `<CrO
extendedsupporteligible|
extendedsupportstart|
extendedsupportenabled|
faninfo|
firmwareversion|
firstenrollmenttime|
lastdeprovisiontimestamp|

View File

@@ -10,6 +10,20 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.07.16
Added `chromeostype`, `diskspaceusage` and `faninfo` to `<CrOSFieldName>` for use in `gam info|print cros`.
Fixed bugs/cleaned output in `gam info|print cros`.
### 7.07.15
Added option `shareddrivesoption included|included_if_account_is_not_a_member|not_included` to `gam create vaultexport`.
The previous option `includeshareddrives <Boolean>` is mapped as follows:
* `includeshareddrives false` - `shareddrivesoption included_if_account_is_not_a_member`
* `includeshareddrives true` - `shareddrivesoption included`
### 7.07.14
Update `gam setup chat` output to include the following that shows the actual Cloud Pub/Sub Topic Name.

View File

@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAM 7.07.14 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.07.16 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAM 7.07.14 - https://github.com/GAM-team/GAM - pythonsource
GAM 7.07.16 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
Windows-10-10.0.17134 AMD64

View File

@@ -243,7 +243,8 @@ gam create vaultexport|export matter <MatterItem> [name <String>] corpus calenda
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
[includeshareddrives <Boolean>] [driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
[driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
[driveclientsideencryption any|encrypted|unencrypted]
[includerooms <Boolean>]
[excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
@@ -315,8 +316,11 @@ For `corpus calendar`, you can specify the format of the exported data:
For `corpus drive`, you can specify advanced search options:
* `driveversiondate <Date>|<Time>` - Search the versions of the Drive file as of the reference date. These timestamps are in GMT and rounded down to the given date.
* `includeshareddrives False` - Do not include Shared Drives in the search, this is the default.
* `includeshareddrives True` - Include Shared Drives in the search.
* `includeshareddrives False` - Mapped to `sharedrivesoption included_if_account_is_not_a_member`
* `includeshareddrives True` - Mapped to `sharedrivesoption included`
* `sharedrivesoption included` - Resources in shared drives are included in the search
* `sharedrivesoption included_if_account_is_not_a_member` - Resources in shared drives where account is not a member are included in the search, this is the default
* `sharedrivesoption not_included` - Resources in shared drives are not included in the search
* `driveclientsideencryption any` - Include both client-side encrypted and unencrypted content in search, this is the default.
* `driveclientsideencryption encrypted` - Include client-side encrypted content only in search.
* `driveclientsideencryption unencrypted` - Include client-side unencrypted content only in search.
@@ -599,7 +603,7 @@ gam create vaulthold|hold matter <MatterItem> [name <String>] corpus calendar|dr
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[includerooms <Boolean>]
[covereddata calllogs|textmessages|voicemails]
[includeshareddrives|includeteamdrives <Boolean>]
[includeshareddrives <Boolean>]
[showdetails|returnidonly]
```
Specify the name of the hold:
@@ -621,8 +625,8 @@ Specify the search method, this option is required:
The `query <QueryVaultCorpus>` option can still be used but it is much simpler to use the following options.
For `corpus drive`, you can specify advanced search options:
* `includeshareddrives False` - Do not include Shared Drives in the search, this is the default.
* `includeshareddrives True` - Include Shared Drives in the search.
* `includeshareddrives False` - Files in shared drives are not included in the hold, this is the default
* `includeshareddrives True` - Files in shared drives are included in the hold
For `corpus mail`, you can specify search terms to limit the search.
* `terms <String>` - [Vault search](https://support.google.com/vault/answer/2474474)
@@ -652,12 +656,12 @@ gam update vaulthold|hold <HoldItem> matter <MatterItem>
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[includerooms <Boolean>]
[covereddata calllogs|textmessages|voicemails]
[includeshareddrives|includeteamdrives <Boolean>]
[includeshareddrives <Boolean>]
[showdetails]
```
For a hold with `corpus drive`, you can specify advanced search options:
* `includeshareddrives False` - Do not include Shared Drives in the search, this is the default.
* `includeshareddrives True` - Include Shared Drives in the search.
* `includeshareddrives False` - Files in shared drives are not included in the hold, this is the default
* `includeshareddrives True` - Files in shared drives are included in the hold
For a hold with `corpus mail`, you can specify search terms to limit the search.
* `terms <String>` - [Vault search](https://support.google.com/vault/answer/2474474)

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.07.14 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.07.16 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAM 7.07.14 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.07.16 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAM 7.07.14 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.07.16 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7
Version Check:
Current: 5.35.08
Latest: 7.07.14
Latest: 7.07.16
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
7.07.14
7.07.16
```
In Linux/MacOS you can do:
```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.07.14 - https://github.com/GAM-team/GAM
GAM 7.07.16 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.3 64-bit final
MacOS Sequoia 15.5 x86_64