gam7 7.13.1__py3-none-any.whl → 7.13.3__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 +93 -53
- gam/gamlib/glclargs.py +2 -0
- {gam7-7.13.1.dist-info → gam7-7.13.3.dist-info}/METADATA +1 -1
- {gam7-7.13.1.dist-info → gam7-7.13.3.dist-info}/RECORD +7 -7
- {gam7-7.13.1.dist-info → gam7-7.13.3.dist-info}/WHEEL +0 -0
- {gam7-7.13.1.dist-info → gam7-7.13.3.dist-info}/entry_points.txt +0 -0
- {gam7-7.13.1.dist-info → gam7-7.13.3.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.13.
|
|
28
|
+
__version__ = '7.13.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
|
|
@@ -17071,14 +17071,14 @@ def _convertTransferAppIDtoName(apps, appID):
|
|
|
17071
17071
|
return f'applicationId: {appID}'
|
|
17072
17072
|
|
|
17073
17073
|
DRIVE_AND_DOCS_APP_NAME = 'drive and docs'
|
|
17074
|
-
|
|
17074
|
+
GOOGLE_LOOKER_STUDIO_APP_NAME = 'looker studio'
|
|
17075
17075
|
|
|
17076
17076
|
SERVICE_NAME_CHOICE_MAP = {
|
|
17077
|
-
'datastudio':
|
|
17077
|
+
'datastudio': GOOGLE_LOOKER_STUDIO_APP_NAME,
|
|
17078
17078
|
'drive': DRIVE_AND_DOCS_APP_NAME,
|
|
17079
17079
|
'googledrive': DRIVE_AND_DOCS_APP_NAME,
|
|
17080
17080
|
'gdrive': DRIVE_AND_DOCS_APP_NAME,
|
|
17081
|
-
'lookerstudio':
|
|
17081
|
+
'lookerstudio': GOOGLE_LOOKER_STUDIO_APP_NAME,
|
|
17082
17082
|
}
|
|
17083
17083
|
|
|
17084
17084
|
def _validateTransferAppName(apps, appName):
|
|
@@ -25677,24 +25677,28 @@ def doPrintShowChromeProfiles():
|
|
|
25677
25677
|
csvPF.writeCSVfile('Chrome Profiles')
|
|
25678
25678
|
|
|
25679
25679
|
def _getChromeProfileNameList():
|
|
25680
|
-
if not Cmd.PeekArgumentPresent(['select', 'filter', 'filters']):
|
|
25680
|
+
if not Cmd.PeekArgumentPresent(['select', 'commands', 'filter', 'filters']):
|
|
25681
25681
|
return getString(Cmd.OB_CHROMEPROFILE_NAME_LIST).replace(',', ' ').split()
|
|
25682
25682
|
return []
|
|
25683
25683
|
|
|
25684
25684
|
def _initChromeProfileNameParameters():
|
|
25685
25685
|
cm = buildGAPIObject(API.CHROMEMANAGEMENT)
|
|
25686
|
-
return (cm, {'profileNameList': _getChromeProfileNameList(),
|
|
25686
|
+
return (cm, {'profileNameList': _getChromeProfileNameList(),
|
|
25687
|
+
'commandNameList': [],
|
|
25688
|
+
'customerId': _getCustomerId(),
|
|
25687
25689
|
'cbfilter': None, 'filterTimes': {},
|
|
25688
25690
|
'OBY': OrderBy(CHROMEPROFILE_ORDERBY_CHOICE_MAP)})
|
|
25689
25691
|
|
|
25690
25692
|
def _getChromeProfileNameParameters(myarg, parameters):
|
|
25691
|
-
if not parameters['cbfilter'] and myarg == 'select':
|
|
25693
|
+
if not parameters['cbfilter'] and not parameters['commandNameList'] and myarg == 'select':
|
|
25692
25694
|
parameters['profileNameList'].extend(getEntityList(Cmd.OB_CHROMEPROFILE_NAME_LIST))
|
|
25693
|
-
elif not parameters['profileNameList'] and myarg == '
|
|
25695
|
+
elif not parameters['cbfilter'] and not parameters['profileNameList'] and myarg == 'commands':
|
|
25696
|
+
parameters['commandNameList'].extend(getEntityList(Cmd.OB_CHROMEPROFILE_COMMAND_NAME_LIST))
|
|
25697
|
+
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg == 'orderby':
|
|
25694
25698
|
parameters['OBY'].GetChoice()
|
|
25695
|
-
elif not parameters['profileNameList'] and myarg.startswith('filtertime'):
|
|
25699
|
+
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg.startswith('filtertime'):
|
|
25696
25700
|
parameters['filterTimes'][myarg] = getTimeOrDeltaFromNow()
|
|
25697
|
-
elif not parameters['profileNameList'] and myarg in {'filter', 'filters'}:
|
|
25701
|
+
elif not parameters['profileNameList'] and not parameters['commandNameList'] and myarg in {'filter', 'filters'}:
|
|
25698
25702
|
parameters['cbfilter'] = getString(Cmd.OB_STRING)
|
|
25699
25703
|
else:
|
|
25700
25704
|
return False
|
|
@@ -25703,9 +25707,14 @@ def _getChromeProfileNameParameters(myarg, parameters):
|
|
|
25703
25707
|
def _getChromeProfileNameEntityForCommand(cm, parameters):
|
|
25704
25708
|
if parameters['cbfilter'] is None:
|
|
25705
25709
|
customerId = parameters['customerId']
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
|
|
25710
|
+
if parameters['profileNameList']:
|
|
25711
|
+
for i, profileName in enumerate(parameters['profileNameList']):
|
|
25712
|
+
if not profileName.startswith('customers'):
|
|
25713
|
+
parameters['profileNameList'][i] = f'customers/{customerId}/profiles/{profileName}'
|
|
25714
|
+
elif parameters['commandNameList']:
|
|
25715
|
+
for i, commandName in enumerate(parameters['commandNameList']):
|
|
25716
|
+
if not commandName.startswith('customers'):
|
|
25717
|
+
parameters['commandNameList'][i] = f'customers/{customerId}/profiles/{commandName}'
|
|
25709
25718
|
return
|
|
25710
25719
|
if parameters['filterTimes']:
|
|
25711
25720
|
for filterTimeName, filterTimeValue in iter(parameters['filterTimes'].items()):
|
|
@@ -25740,21 +25749,38 @@ def _showChromeProfileCommand(profcmd, FJQC, i=0, count=0):
|
|
|
25740
25749
|
showJSON(None, profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
|
25741
25750
|
Ind.Decrement()
|
|
25742
25751
|
|
|
25752
|
+
def _printChromeProfileCommand(profcmd, csvPF, FJQC):
|
|
25753
|
+
row = flattenJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
|
25754
|
+
if not FJQC.formatJSON:
|
|
25755
|
+
csvPF.WriteRowTitles(row)
|
|
25756
|
+
elif csvPF.CheckRowTitles(row):
|
|
25757
|
+
csvPF.WriteRowNoFilter({'name': profcmd['name'],
|
|
25758
|
+
'JSON': json.dumps(cleanJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS),
|
|
25759
|
+
ensure_ascii=False, sort_keys=True)})
|
|
25760
|
+
|
|
25743
25761
|
# gam create chromeprofilecommand <ChromeProfileNameEntity>
|
|
25744
25762
|
# [clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
|
25745
|
-
# [formatjson]
|
|
25763
|
+
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
|
25746
25764
|
def doCreateChromeProfileCommand():
|
|
25747
25765
|
cm, parameters = _initChromeProfileNameParameters()
|
|
25748
25766
|
body = {'commandType': 'clearBrowsingData', 'payload': {}}
|
|
25749
|
-
|
|
25767
|
+
csvPF = None
|
|
25768
|
+
FJQC = FormatJSONQuoteChar(None)
|
|
25750
25769
|
while Cmd.ArgumentsRemaining():
|
|
25751
25770
|
myarg = getArgument()
|
|
25752
|
-
if myarg
|
|
25771
|
+
if _getChromeProfileNameParameters(myarg, parameters):
|
|
25772
|
+
pass
|
|
25773
|
+
elif myarg == 'clearcache':
|
|
25753
25774
|
body['payload']['clearCache'] = getBoolean()
|
|
25754
25775
|
elif myarg == 'clearcookies':
|
|
25755
25776
|
body['payload']['clearCookies'] = getBoolean()
|
|
25777
|
+
elif myarg == 'csv':
|
|
25778
|
+
csvPF = CSVPrintFile(['name'], 'sortall')
|
|
25779
|
+
FJQC.SetCsvPF(csvPF)
|
|
25780
|
+
elif csvPF and myarg == 'todrive':
|
|
25781
|
+
csvPF.GetTodriveParameters()
|
|
25756
25782
|
else:
|
|
25757
|
-
FJQC.
|
|
25783
|
+
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
25758
25784
|
_getChromeProfileNameEntityForCommand(cm, parameters)
|
|
25759
25785
|
count = len(parameters['profileNameList'])
|
|
25760
25786
|
i = 0
|
|
@@ -25764,11 +25790,16 @@ def doCreateChromeProfileCommand():
|
|
|
25764
25790
|
profcmd = callGAPI(cm.customers().profiles().commands(), 'create',
|
|
25765
25791
|
throwReasons=[GAPI.INVALID_ARGUMENT, GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
|
|
25766
25792
|
parent=profileName, body=body)
|
|
25767
|
-
|
|
25793
|
+
if csvPF is None:
|
|
25794
|
+
_showChromeProfileCommand(profcmd, FJQC, i, count)
|
|
25795
|
+
else:
|
|
25796
|
+
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
|
25768
25797
|
except (GAPI.notFound) as e:
|
|
25769
25798
|
entityActionFailedWarning([Ent.CHROME_PROFILE_COMMAND, profileName], str(e), i, count)
|
|
25770
25799
|
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
25771
25800
|
entityActionFailedExit([Ent.CHROME_PROFILE_COMMAND, profileName], str(e))
|
|
25801
|
+
if csvPF:
|
|
25802
|
+
csvPF.writeCSVfile('Chrome Profile Commands')
|
|
25772
25803
|
|
|
25773
25804
|
# gam info chromeprofilecommand <ChromeProfileCommandName>
|
|
25774
25805
|
# [formatjson]
|
|
@@ -25792,15 +25823,6 @@ def doInfoChromeProfileCommand():
|
|
|
25792
25823
|
# gam print chromeprofilecommands <ChromeProfilNameEntity> [todrive <ToDriveAttribute>*]
|
|
25793
25824
|
# [formatjson [quotechar <Character>]]
|
|
25794
25825
|
def doPrintShowChromeProfileCommands():
|
|
25795
|
-
def _printProfileCommand(profcmd):
|
|
25796
|
-
row = flattenJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS)
|
|
25797
|
-
if not FJQC.formatJSON:
|
|
25798
|
-
csvPF.WriteRowTitles(row)
|
|
25799
|
-
elif csvPF.CheckRowTitles(row):
|
|
25800
|
-
csvPF.WriteRowNoFilter({'name': profcmd['name'],
|
|
25801
|
-
'JSON': json.dumps(cleanJSON(profcmd, timeObjects=CHROMEPROFILECOMMAND_TIME_OBJECTS),
|
|
25802
|
-
ensure_ascii=False, sort_keys=True)})
|
|
25803
|
-
|
|
25804
25826
|
csvPF = CSVPrintFile(['name']) if Act.csvFormat() else None
|
|
25805
25827
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
25806
25828
|
cm, parameters = _initChromeProfileNameParameters()
|
|
@@ -25813,32 +25835,50 @@ def doPrintShowChromeProfileCommands():
|
|
|
25813
25835
|
else:
|
|
25814
25836
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
25815
25837
|
_getChromeProfileNameEntityForCommand(cm, parameters)
|
|
25816
|
-
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
|
|
25821
|
-
|
|
25822
|
-
|
|
25823
|
-
|
|
25824
|
-
|
|
25825
|
-
|
|
25826
|
-
|
|
25827
|
-
|
|
25828
|
-
|
|
25829
|
-
|
|
25830
|
-
|
|
25831
|
-
|
|
25832
|
-
|
|
25833
|
-
|
|
25834
|
-
|
|
25835
|
-
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
25839
|
-
|
|
25840
|
-
|
|
25841
|
-
|
|
25838
|
+
if parameters['profileNameList']:
|
|
25839
|
+
count = len(parameters['profileNameList'])
|
|
25840
|
+
i = 0
|
|
25841
|
+
for profileName in parameters['profileNameList']:
|
|
25842
|
+
i +=1
|
|
25843
|
+
printGettingEntityItemForWhom(Ent.CHROME_PROFILE_COMMAND, profileName, i, count)
|
|
25844
|
+
pageMessage = getPageMessage()
|
|
25845
|
+
try:
|
|
25846
|
+
profcmds = callGAPIpages(cm.customers().profiles().commands(), 'list', 'chromeBrowserProfileCommands',
|
|
25847
|
+
pageMessage=pageMessage,
|
|
25848
|
+
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
|
25849
|
+
parent=profileName, pageSize=100)
|
|
25850
|
+
if not csvPF:
|
|
25851
|
+
jcount = len(profcmds)
|
|
25852
|
+
Ind.Increment()
|
|
25853
|
+
j = 0
|
|
25854
|
+
for profcmd in profcmds:
|
|
25855
|
+
j += 1
|
|
25856
|
+
_showChromeProfileCommand(profcmd, FJQC, j, jcount)
|
|
25857
|
+
Ind.Decrement()
|
|
25858
|
+
else:
|
|
25859
|
+
for profcmd in profcmds:
|
|
25860
|
+
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
|
25861
|
+
except GAPI.notFound as e:
|
|
25862
|
+
entityActionFailedWarning([Ent.CHROME_PROFILE, profileName], str(e), i, count)
|
|
25863
|
+
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
25864
|
+
entityActionFailedExit([Ent.CHROME_PROFILE, profileName], str(e))
|
|
25865
|
+
elif parameters['commandNameList']:
|
|
25866
|
+
count = len(parameters['commandNameList'])
|
|
25867
|
+
i = 0
|
|
25868
|
+
for profileCommandName in parameters['commandNameList']:
|
|
25869
|
+
i +=1
|
|
25870
|
+
try:
|
|
25871
|
+
profcmd = callGAPI(cm.customers().profiles().commands(), 'get',
|
|
25872
|
+
throwReasons=[GAPI.INVALID_ARGUMENT, GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
|
|
25873
|
+
name=profileCommandName)
|
|
25874
|
+
if not csvPF:
|
|
25875
|
+
_showChromeProfileCommand(profcmd, FJQC, i, count)
|
|
25876
|
+
else:
|
|
25877
|
+
_printChromeProfileCommand(profcmd, csvPF, FJQC)
|
|
25878
|
+
except GAPI.notFound as e:
|
|
25879
|
+
entityActionFailedWarning([Ent.CHROME_PROFILE_COMMAND, profileCommandName], str(e), i, count)
|
|
25880
|
+
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
25881
|
+
entityActionFailedExit([Ent.CHROME_PROFILE, profileCommandName], str(e))
|
|
25842
25882
|
if csvPF:
|
|
25843
25883
|
csvPF.writeCSVfile('Chrome Profile Commands')
|
|
25844
25884
|
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -859,6 +859,8 @@ class GamCLArgs():
|
|
|
859
859
|
OB_CHAT_THREAD = 'ChatThread'
|
|
860
860
|
OB_CHROMEPROFILE_NAME = 'ChromeProfileName'
|
|
861
861
|
OB_CHROMEPROFILE_NAME_LIST = 'ChromeProfileNameList'
|
|
862
|
+
OB_CHROMEPROFILE_COMMAND_NAME = 'ChromeProfileCommandName'
|
|
863
|
+
OB_CHROMEPROFILE_COMMAND_NAME_LIST = 'ChromeProfileNameCommandList'
|
|
862
864
|
OB_CHROME_VERSION = 'ChromeVersion'
|
|
863
865
|
OB_CIDR_NETMASK = 'CIDRnetmask'
|
|
864
866
|
OB_CIGROUP_ALIAS_LIST = "CIGroupAliasList"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=evlJ5qIFGRjZn43m5KrUowSCy_CY7k_EfA_XvpJuu94,3563784
|
|
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
|
|
@@ -25,7 +25,7 @@ gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
26
|
gam/gamlib/glapi.py,sha256=27NW2etvdNK4jfR699eqFzhV4gPotijXIQeX-wxCvHA,35319
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=bNTckxzIM_HruxO2DfYsDbEgqOIz1RX6CbU6XOQQQyg,28296
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=b-2ow-EeVoDbwhmlGYtZ4JCowy7icwvy_r2aILci_Nc,43007
|
|
29
29
|
gam/gamlib/glentity.py,sha256=zQ64Q5MVDnJwgUTxNapO5s-KC8yfr1fS4GxXu7uGPT0,33877
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=sJMWCyVd_2MP3rF2z-zqFwWEdUu6kceRA7e42u4kVv8,40181
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
@@ -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.13.
|
|
69
|
-
gam7-7.13.
|
|
70
|
-
gam7-7.13.
|
|
71
|
-
gam7-7.13.
|
|
72
|
-
gam7-7.13.
|
|
68
|
+
gam7-7.13.3.dist-info/METADATA,sha256=v6As87oNBBgCjvpF9pfWwJ1jyVHHnu-O4L78dSaYEMM,2978
|
|
69
|
+
gam7-7.13.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.13.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.13.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.13.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|