Add info printer command/ChromePolicy cleanup (#1337)

* Add info printer command

* ChromePolicy cleanup

Make update chromepolicy orgunit default to / like delete and print
Add `filter <String>` to print chromeschema
Make update_policy code to set additionalTargetKeys consistent with delete_policy

I left verb at print for chromepolicy/chromeschema

* When printing schemasa, use ":" instead of " - "

* Fix print policy indentation

* Chrome policy cleanup

orgunit must be specified
Use verb show, add verb print later

* Recognize all ou forms to exit from schema mode

* Don't assign multiple variables on same line
This commit is contained in:
Ross Scroggs
2021-03-19 09:46:07 -07:00
committed by GitHub
parent a65635365e
commit 6f2ebf8d2d
4 changed files with 66 additions and 37 deletions

View File

@@ -11295,6 +11295,8 @@ def ProcessGAMCommand(args):
gapi_directory_domainaliases.info()
elif argument in ['resoldcustomer', 'resellercustomer']:
doGetResoldCustomer()
elif argument in ['printer']:
gapi_directory_printers.info()
elif argument in [
'resoldsubscription', 'resoldsubscriptions',
'resellersubscription', 'resellersubscriptions'
@@ -11493,10 +11495,6 @@ def ProcessGAMCommand(args):
gapi_directory_printers.print_models()
elif argument in ['printers']:
gapi_directory_printers.print_()
elif argument == 'chromeschema':
gapi_chromepolicy.print_schemas()
elif argument == 'chromepolicy':
gapi_chromepolicy.print_policies()
else:
controlflow.invalid_argument_exit(argument, 'gam print')
sys.exit(0)
@@ -11514,6 +11512,10 @@ def ProcessGAMCommand(args):
doShowServiceAccountKeys()
elif argument in ['browsertoken', 'browsertokens']:
gapi_cbcm.printshowtokens(False)
elif argument == 'chromeschema':
gapi_chromepolicy.printshow_schemas()
elif argument == 'chromepolicy':
gapi_chromepolicy.printshow_policies()
else:
controlflow.invalid_argument_exit(argument, 'gam show')
sys.exit(0)