diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 834b6460..823fee07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -848,7 +848,6 @@ jobs: $gam user $gam_user show shareddrives asadmin $gam user $gam_user update shareddrive "${driveid}" ou "aaaGithub Actions" # so we can delete our OU... $gam user $gam_user delete shareddrive "${driveid}" nukefromorbit - echo "printer model count:" ssoprofile=$($gam config debug_level 1 create inboundssoprofile name "El Goog ${newbase}" loginurl https://www.google.com logouturl https://www.google.com changepasswordurl https://www.google.com entityid ElGoog return_name_only) if [ ${ssoprofile} != 'inProgress' ]; then $gam create inboundssocredential profile "id:${ssoprofile}" generate_key @@ -856,6 +855,7 @@ jobs: #$gam delete inboundssoassignment "orgunit:${newou}" $gam delete inboundssoprofile "id:${ssoprofile}" fi + echo "printer model count:" $gam print printermodels | wc -l $gam print printers printerid=$($gam create printer displayname "${newbase}" uri ipp://localhost:631 driverless description "made by $(gam_user)" ou "${newou}" nodetails | awk '{print substr($2, 1, length($2)-1)}') diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index cc98051c..462c4ae4 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,13 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 6.80.20 + +Updated `gam report usage user` and `gam report users` to handle the followong error: +``` +ERROR: 503: serviceNotAvailable - The service is currently unavailable. +``` + ### 6.80.19 Fixed bug in `gam create inboundssoprofile` that caused a trap due to diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 787eb894..5f1f56b5 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAMADV-XTD3 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -923,7 +923,7 @@ writes the credentials into the file oauth2.txt. C:\>del C:\GAMConfig\oauth2.txt C:\>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAMADV-XTD3 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Inbound-SSO.md b/docs/Inbound-SSO.md index 4972d0e8..9c5f10ab 100644 --- a/docs/Inbound-SSO.md +++ b/docs/Inbound-SSO.md @@ -53,6 +53,8 @@ use the `returnnameonly` option to have GAM display just the profile name of the This will be useful in scripts that create|update a profile and then want to perform subsequent GAM commands that reference the profile. +If `returnnameonly is specified, `inProgress` is returned if the API does not return a complete result. + ``` gam delete inboundssoprofile ``` diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index 69b960de..82fe24f8 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAMADV-XTD3 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAMADV-XTD3 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.80.19 + Latest: 6.80.20 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.80.19 +6.80.20 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.80.19 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.80.20 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 5c271a76..f1dea1e1 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,13 @@ Merged GAM-Team version +6.80.20 + +Updated `gam report usage user` and `gam report users` to handle the followong error: +``` +ERROR: 503: serviceNotAvailable - The service is currently unavailable. +``` + 6.80.19 Fixed bug in `gam create inboundssoprofile` that caused a trap due to diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 5bd771fe..f1184929 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -13253,7 +13253,8 @@ def doReportUsage(): try: usage = callGAPIpages(service, 'get', 'usageReports', pageMessage=pageMessage, - throwReasons=[GAPI.INVALID, GAPI.BAD_REQUEST, GAPI.FORBIDDEN], + throwReasons=[GAPI.INVALID, GAPI.INVALID_INPUT, GAPI.BAD_REQUEST, GAPI.FORBIDDEN], + retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS, customerId=customerId, date=useDate, parameters=parameters, **kwarg) except GAPI.badRequest: @@ -13297,6 +13298,8 @@ def doReportUsage(): except GAPI.invalid as e: stderrWarningMsg(str(e)) break + except GAPI.invalidInput as e: + systemErrorExit(GOOGLE_API_ERROR_RC, str(e)) except GAPI.forbidden: accessErrorExit(None) if startUseDate: @@ -13860,6 +13863,7 @@ def doReport(): usage = callGAPIpages(service, 'get', 'usageReports', pageMessage=pageMessage, throwReasons=[GAPI.INVALID, GAPI.INVALID_INPUT, GAPI.BAD_REQUEST, GAPI.FORBIDDEN], + retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS, userKey=user, date=tryDate, customerId=customerId, orgUnitID=orgUnitId, filters=filters, parameters=parameters, maxResults=maxResults)