mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-09 14:13:35 +00:00
Implement Chrome Management API calls (#1350)
* Implement Chrome Management API calls * User start/end in print chromeappdevices * Handle a Chrome version without a version field
This commit is contained in:
@ -53,6 +53,7 @@ from gam import fileutils
|
||||
from gam.gapi import calendar as gapi_calendar
|
||||
from gam.gapi import cloudidentity as gapi_cloudidentity
|
||||
from gam.gapi import cbcm as gapi_cbcm
|
||||
from gam.gapi import chromemanagement as gapi_chromemanagement
|
||||
from gam.gapi import chromepolicy as gapi_chromepolicy
|
||||
from gam.gapi.cloudidentity import devices as gapi_cloudidentity_devices
|
||||
from gam.gapi.cloudidentity import groups as gapi_cloudidentity_groups
|
||||
@ -10248,6 +10249,11 @@ OAUTH2_SCOPES = [
|
||||
'subscopes': ['readonly'],
|
||||
'scopes': 'https://www.googleapis.com/auth/admin.directory.device.chromebrowsers',
|
||||
},
|
||||
{
|
||||
'name': 'Chrome Management API - read only',
|
||||
'subscope': [],
|
||||
'scopes': ['https://www.googleapis.com/auth/chrome.management.reports.readonly'],
|
||||
},
|
||||
{
|
||||
'name': 'Chrome Policy API',
|
||||
'subscope': ['readonly'],
|
||||
@ -11493,6 +11499,12 @@ def ProcessGAMCommand(args):
|
||||
gapi_directory_printers.print_models()
|
||||
elif argument in ['printers']:
|
||||
gapi_directory_printers.print_()
|
||||
elif argument in ['chromeapps']:
|
||||
gapi_chromemanagement.printApps()
|
||||
elif argument in ['chromeappdevices']:
|
||||
gapi_chromemanagement.printAppDevices()
|
||||
elif argument in ['chromeversions']:
|
||||
gapi_chromemanagement.printVersions()
|
||||
else:
|
||||
controlflow.invalid_argument_exit(argument, 'gam print')
|
||||
sys.exit(0)
|
||||
|
Reference in New Issue
Block a user