make vaultcount a print command

This commit is contained in:
Jay Lee
2020-12-06 16:17:00 -05:00
parent 934a671344
commit 5a1f237b30
3 changed files with 7 additions and 3 deletions

View File

@@ -264,6 +264,7 @@ jobs:
$gam create vaulthold matter $matterid name "Travis hold $newbase" corpus mail accounts $newuser
$gam print vaultmatters matterstate open
$gam print vaultholds matter $matterid
$gam print vaultcount matter $matterid corpus mail everyone todrive
$gam create vaultexport matter $matterid name "Travis export $newbase" corpus mail accounts $newuser
$gam print exports matter $matterid | $gam csv - gam info export $matterid id:~~id~~
$gam csv sample.csv gam user ~email add calendar id:$newresource

View File

@@ -11383,6 +11383,8 @@ def ProcessGAMCommand(args):
doPrintShowAlertFeedback()
elif argument in ['browser', 'browsers']:
gapi_cbcm.print_()
elif argument in ['vaultcount']:
gapi_vault.print_count()
else:
controlflow.invalid_argument_exit(argument, 'gam print')
sys.exit(0)
@@ -11398,8 +11400,6 @@ def ProcessGAMCommand(args):
doPrintShowProjects(False)
elif argument in ['sakey', 'sakeys']:
doShowServiceAccountKeys()
elif argument in ['vaultcount']:
gapi_vault.get_count()
else:
controlflow.invalid_argument_exit(argument, 'gam show')
sys.exit(0)

View File

@@ -291,7 +291,7 @@ def getExportInfo():
display.print_json(export)
def get_count():
def print_count():
v = buildGAPIObject()
query_discovery = v._rootDesc['schemas']['Query']
matterId = None
@@ -309,6 +309,9 @@ def get_count():
elif myarg == 'operation':
name = sys.argv[i+1]
i += 2
elif myarg == 'todrive':
todrive = True
i += 1
elif myarg in QUERY_ARGS:
query, i = _build_query(query, myarg, i, query_discovery)
elif myarg == 'wait':