gam7 7.7.15__py3-none-any.whl → 7.7.17__py3-none-any.whl
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.
- gam/__init__.py +65 -26
- {gam7-7.7.15.dist-info → gam7-7.7.17.dist-info}/METADATA +1 -1
- {gam7-7.7.15.dist-info → gam7-7.7.17.dist-info}/RECORD +6 -6
- {gam7-7.7.15.dist-info → gam7-7.7.17.dist-info}/WHEEL +0 -0
- {gam7-7.7.15.dist-info → gam7-7.7.17.dist-info}/entry_points.txt +0 -0
- {gam7-7.7.15.dist-info → gam7-7.7.17.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -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.07.
|
|
28
|
+
__version__ = '7.07.17'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -23759,12 +23759,14 @@ CROS_FIELDS_CHOICE_MAP = {
|
|
|
23759
23759
|
'autoupdatethrough': 'autoUpdateThrough',
|
|
23760
23760
|
'backlightinfo': 'backlightInfo',
|
|
23761
23761
|
'bootmode': 'bootMode',
|
|
23762
|
+
'chromeostype': 'chromeOsType',
|
|
23762
23763
|
'cpuinfo': 'cpuInfo',
|
|
23763
23764
|
'cpustatusreports': 'cpuStatusReports',
|
|
23764
23765
|
'deprovisionreason': 'deprovisionReason',
|
|
23765
23766
|
'devicefiles': ['deviceFiles.type', 'deviceFiles.createTime'],
|
|
23766
23767
|
'deviceid': 'deviceId',
|
|
23767
23768
|
'devicelicensetype': 'deviceLicenseType',
|
|
23769
|
+
'diskspaceusage': 'diskSpaceUsage',
|
|
23768
23770
|
'diskvolumereports': 'diskVolumeReports',
|
|
23769
23771
|
'dockmacaddress': 'dockMacAddress',
|
|
23770
23772
|
'ethernetmacaddress': 'ethernetMacAddress',
|
|
@@ -23772,6 +23774,7 @@ CROS_FIELDS_CHOICE_MAP = {
|
|
|
23772
23774
|
'extendedsupporteligible': 'extendedSupportEligible',
|
|
23773
23775
|
'extendedsupportstart': 'extendedSupportStart',
|
|
23774
23776
|
'extendedsupportenabled': 'extendedSupportEnabled',
|
|
23777
|
+
'faninfo': 'fanInfo',
|
|
23775
23778
|
'firmwareversion': 'firmwareVersion',
|
|
23776
23779
|
'firstenrollmenttime': 'firstEnrollmentTime',
|
|
23777
23780
|
'lastdeprovisiontimestamp': 'lastDeprovisionTimestamp',
|
|
@@ -23819,6 +23822,7 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
|
|
|
23819
23822
|
'notes',
|
|
23820
23823
|
'serialNumber',
|
|
23821
23824
|
'status',
|
|
23825
|
+
'chromeOsType',
|
|
23822
23826
|
'deviceLicenseType',
|
|
23823
23827
|
'model',
|
|
23824
23828
|
'firmwareVersion',
|
|
@@ -23839,6 +23843,7 @@ CROS_SCALAR_PROPERTY_PRINT_ORDER = [
|
|
|
23839
23843
|
'manufactureDate',
|
|
23840
23844
|
'supportEndDate',
|
|
23841
23845
|
'autoUpdateExpiration',
|
|
23846
|
+
'autoUpdateThrough',
|
|
23842
23847
|
'willAutoRenew',
|
|
23843
23848
|
]
|
|
23844
23849
|
|
|
@@ -23863,8 +23868,11 @@ CROS_TIME_OBJECTS = {
|
|
|
23863
23868
|
'lastDeprovisionTimestamp',
|
|
23864
23869
|
'lastEnrollmentTime',
|
|
23865
23870
|
'lastSync',
|
|
23871
|
+
'rebootTime',
|
|
23866
23872
|
'reportTime',
|
|
23867
23873
|
'supportEndDate',
|
|
23874
|
+
'updateTime',
|
|
23875
|
+
'updateCheckTime',
|
|
23868
23876
|
}
|
|
23869
23877
|
CROS_FIELDS_WITH_CRS_NLS = {'notes'}
|
|
23870
23878
|
CROS_START_ARGUMENTS = ['start', 'startdate', 'oldestdate']
|
|
@@ -23981,13 +23989,13 @@ def infoCrOSDevices(entityList):
|
|
|
23981
23989
|
printKeyValueWithCRsNLs(up, cros[up])
|
|
23982
23990
|
else:
|
|
23983
23991
|
printKeyValueList([up, formatLocalTime(cros[up])])
|
|
23984
|
-
up
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23992
|
+
for up in ['diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo']:
|
|
23993
|
+
if up in cros:
|
|
23994
|
+
printKeyValueList([up, ''])
|
|
23995
|
+
Ind.Increment()
|
|
23996
|
+
for key, value in sorted(iter(cros[up].items())):
|
|
23997
|
+
printKeyValueList([key, value])
|
|
23998
|
+
Ind.Decrement()
|
|
23991
23999
|
if not noLists:
|
|
23992
24000
|
activeTimeRanges = _filterActiveTimeRanges(cros, True, listLimit, startDate, endDate, activeTimeRangesOrder)
|
|
23993
24001
|
if activeTimeRanges:
|
|
@@ -24041,6 +24049,9 @@ def infoCrOSDevices(entityList):
|
|
|
24041
24049
|
entityActionNotPerformedWarning([Ent.CROS_DEVICE, deviceId, Ent.DEVICE_FILE, downloadfile],
|
|
24042
24050
|
Msg.NO_ENTITIES_FOUND.format(Ent.Plural(Ent.DEVICE_FILE)), i, count)
|
|
24043
24051
|
Act.Set(Act.INFO)
|
|
24052
|
+
cpuInfo = _filterBasicList(cros, 'cpuInfo', True, listLimit)
|
|
24053
|
+
if cpuInfo:
|
|
24054
|
+
showJSON('cpuInfo', cpuInfo, dictObjectsKey={'cpuInfo': 'model'})
|
|
24044
24055
|
cpuStatusReports = _filterCPUStatusReports(cros, True, listLimit, startTime, endTime)
|
|
24045
24056
|
if cpuStatusReports:
|
|
24046
24057
|
printKeyValueList(['cpuStatusReports'])
|
|
@@ -24058,6 +24069,12 @@ def infoCrOSDevices(entityList):
|
|
|
24058
24069
|
printKeyValueList(['cpuUtilizationPercentageInfo', cpuStatusReport['cpuUtilizationPercentageInfo']])
|
|
24059
24070
|
Ind.Decrement()
|
|
24060
24071
|
Ind.Decrement()
|
|
24072
|
+
backlightInfo = _filterBasicList(cros, 'backLightInfo', True, listLimit)
|
|
24073
|
+
if backlightInfo:
|
|
24074
|
+
showJSON('backlightInfo', backlightInfo, dictObjectsKey={'backlightInfo': 'path'})
|
|
24075
|
+
fanInfo = _filterBasicList(cros, 'fanInfo', True, listLimit)
|
|
24076
|
+
if fanInfo:
|
|
24077
|
+
showJSON('fanInfo', fanInfo)
|
|
24061
24078
|
diskVolumeReports = _filterBasicList(cros, 'diskVolumeReports', True, listLimit)
|
|
24062
24079
|
if diskVolumeReports:
|
|
24063
24080
|
printKeyValueList(['diskVolumeReports'])
|
|
@@ -24284,7 +24301,7 @@ CROS_ENTITIES_MAP = {
|
|
|
24284
24301
|
}
|
|
24285
24302
|
|
|
24286
24303
|
CROS_INDEXED_TITLES = ['activeTimeRanges', 'recentUsers', 'deviceFiles',
|
|
24287
|
-
'cpuStatusReports', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports']
|
|
24304
|
+
'cpuStatusReports', 'cpuInfo', 'backlightInfo', 'fanInfo', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports']
|
|
24288
24305
|
|
|
24289
24306
|
# gam print cros [todrive <ToDriveAttribute>*]
|
|
24290
24307
|
# [(query <QueryCrOS>)|(queries <QueryCrOSList>) [querytime<String> <Time>]
|
|
@@ -24331,12 +24348,15 @@ def doPrintCrOSDevices(entityList=None):
|
|
|
24331
24348
|
if not noLists and not selectedLists:
|
|
24332
24349
|
csvPF.WriteRowTitles(flattenJSON(cros, listLimit=listLimit, timeObjects=CROS_TIME_OBJECTS))
|
|
24333
24350
|
return
|
|
24334
|
-
attrib
|
|
24335
|
-
|
|
24336
|
-
|
|
24337
|
-
|
|
24338
|
-
|
|
24339
|
-
|
|
24351
|
+
for attrib in ['diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo']:
|
|
24352
|
+
if attrib in cros:
|
|
24353
|
+
for key, value in sorted(iter(cros[attrib].items())):
|
|
24354
|
+
attribKey = f'{attrib}{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{key}'
|
|
24355
|
+
if key not in CROS_TIME_OBJECTS:
|
|
24356
|
+
cros[attribKey] = value
|
|
24357
|
+
else:
|
|
24358
|
+
cros[attribKey] = formatLocalTime(value)
|
|
24359
|
+
cros.pop(attrib)
|
|
24340
24360
|
activeTimeRanges = _filterActiveTimeRanges(cros, selectedLists.get('activeTimeRanges', False), listLimit, startDate, endDate, activeTimeRangesOrder)
|
|
24341
24361
|
recentUsers = _filterRecentUsers(cros, selectedLists.get('recentUsers', False), listLimit)
|
|
24342
24362
|
deviceFiles = _filterDeviceFiles(cros, selectedLists.get('deviceFiles', False), listLimit, startTime, endTime)
|
|
@@ -24350,8 +24370,10 @@ def doPrintCrOSDevices(entityList=None):
|
|
|
24350
24370
|
return
|
|
24351
24371
|
row = {}
|
|
24352
24372
|
for attrib in cros:
|
|
24353
|
-
if attrib
|
|
24354
|
-
|
|
24373
|
+
if attrib in {'cpuInfo', 'backlightInfo', 'fanInfo'}:
|
|
24374
|
+
flattenJSON({attrib: cros[attrib]}, flattened=row)
|
|
24375
|
+
elif attrib not in {'kind', 'etag', 'diskSpaceUsage', 'osUpdateStatus', 'tpmVersionInfo', 'activeTimeRanges', 'recentUsers',
|
|
24376
|
+
'deviceFiles', 'cpuStatusReports', 'diskVolumeReports', 'lastKnownNetwork', 'screenshotFiles', 'systemRamFreeReports'}:
|
|
24355
24377
|
if attrib not in CROS_TIME_OBJECTS:
|
|
24356
24378
|
row[attrib] = cros[attrib]
|
|
24357
24379
|
else:
|
|
@@ -29565,7 +29587,7 @@ DEVICE_ORDERBY_CHOICE_MAP = {
|
|
|
29565
29587
|
# <DeviceFieldName>* [fields <DeviceFieldNameList>] [userfields <DeviceUserFieldNameList>]
|
|
29566
29588
|
# [orderby <DeviceOrderByFieldName> [ascending|descending]]
|
|
29567
29589
|
# [all|company|personal|nocompanydevices|nopersonaldevices]
|
|
29568
|
-
# [nodeviceusers]
|
|
29590
|
+
# [nodeviceusers|oneuserperrow]
|
|
29569
29591
|
# [formatjson [quotechar <Character>]]
|
|
29570
29592
|
# [showitemcountonly]
|
|
29571
29593
|
def doPrintCIDevices():
|
|
@@ -29581,7 +29603,7 @@ def doPrintCIDevices():
|
|
|
29581
29603
|
queries = [None]
|
|
29582
29604
|
view, entityType = DEVICE_VIEW_CHOICE_MAP['all']
|
|
29583
29605
|
getDeviceUsers = True
|
|
29584
|
-
showItemCountOnly = False
|
|
29606
|
+
oneUserPerRow = showItemCountOnly = False
|
|
29585
29607
|
while Cmd.ArgumentsRemaining():
|
|
29586
29608
|
myarg = getArgument()
|
|
29587
29609
|
if csvPF and myarg == 'todrive':
|
|
@@ -29596,6 +29618,8 @@ def doPrintCIDevices():
|
|
|
29596
29618
|
view, entityType = DEVICE_VIEW_CHOICE_MAP[myarg]
|
|
29597
29619
|
elif myarg == 'nodeviceusers':
|
|
29598
29620
|
getDeviceUsers = False
|
|
29621
|
+
elif myarg in {'oneuserperrow', 'oneitemperrow'}:
|
|
29622
|
+
getDeviceUsers = oneUserPerRow = True
|
|
29599
29623
|
elif getFieldsList(myarg, DEVICE_FIELDS_CHOICE_MAP, fieldsList, initialField='name'):
|
|
29600
29624
|
pass
|
|
29601
29625
|
elif getFieldsList(myarg, DEVICEUSER_FIELDS_CHOICE_MAP, userFieldsList, initialField='name', fieldsArg='userfields'):
|
|
@@ -29609,6 +29633,8 @@ def doPrintCIDevices():
|
|
|
29609
29633
|
fields = getItemFieldsFromFieldsList('devices', fieldsList)
|
|
29610
29634
|
userFields = getItemFieldsFromFieldsList('deviceUsers', userFieldsList)
|
|
29611
29635
|
substituteQueryTimes(queries, queryTimes)
|
|
29636
|
+
if FJQC.formatJSON and oneUserPerRow:
|
|
29637
|
+
csvPF.SetJSONTitles(['name', 'user.name', 'JSON'])
|
|
29612
29638
|
itemCount = 0
|
|
29613
29639
|
for query in queries:
|
|
29614
29640
|
printGettingAllAccountEntities(entityType, query)
|
|
@@ -29650,13 +29676,26 @@ def doPrintCIDevices():
|
|
|
29650
29676
|
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
29651
29677
|
entityActionFailedWarning([entityType, None], str(e))
|
|
29652
29678
|
for device in devices:
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
csvPF.
|
|
29658
|
-
|
|
29659
|
-
|
|
29679
|
+
if not oneUserPerRow or 'users' not in device:
|
|
29680
|
+
row = flattenJSON(device, timeObjects=DEVICE_TIME_OBJECTS)
|
|
29681
|
+
if not FJQC.formatJSON:
|
|
29682
|
+
csvPF.WriteRowTitles(row)
|
|
29683
|
+
elif csvPF.CheckRowTitles(row):
|
|
29684
|
+
csvPF.WriteRowNoFilter({'name': device['name'],
|
|
29685
|
+
'JSON': json.dumps(cleanJSON(device, timeObjects=DEVICE_TIME_OBJECTS),
|
|
29686
|
+
ensure_ascii=False, sort_keys=True)})
|
|
29687
|
+
else:
|
|
29688
|
+
deviceUsers = device.pop('users')
|
|
29689
|
+
baserow = flattenJSON(device, timeObjects=DEVICE_TIME_OBJECTS)
|
|
29690
|
+
for deviceUser in deviceUsers:
|
|
29691
|
+
row = flattenJSON({'user': deviceUser}, flattened=baserow.copy(), timeObjects=DEVICE_TIME_OBJECTS)
|
|
29692
|
+
if not FJQC.formatJSON:
|
|
29693
|
+
csvPF.WriteRowTitles(row)
|
|
29694
|
+
elif csvPF.CheckRowTitles(row):
|
|
29695
|
+
device['user'] = deviceUser
|
|
29696
|
+
csvPF.WriteRowNoFilter({'name': device['name'], 'user.name': deviceUser['name'],
|
|
29697
|
+
'JSON': json.dumps(cleanJSON(device, timeObjects=DEVICE_TIME_OBJECTS),
|
|
29698
|
+
ensure_ascii=False, sort_keys=True)})
|
|
29660
29699
|
if showItemCountOnly:
|
|
29661
29700
|
writeStdout(f'{itemCount}\n')
|
|
29662
29701
|
return
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=PjYvXrjxg3GyaenwtBy7hoA2riEGofprRxKxfdmnQHA,3504740
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.7.
|
|
69
|
-
gam7-7.7.
|
|
70
|
-
gam7-7.7.
|
|
71
|
-
gam7-7.7.
|
|
72
|
-
gam7-7.7.
|
|
68
|
+
gam7-7.7.17.dist-info/METADATA,sha256=lKGF4vOovocpa-wrhc1ME1NqwEgkyzUWmIm43YJB2ag,2978
|
|
69
|
+
gam7-7.7.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.7.17.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.7.17.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.7.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|