From a42eebdae177d69058dfb8d46c067928736dd9d2 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 4 Feb 2025 14:18:46 -0800 Subject: [PATCH] Added option `security` to `gam create cigroup` --- src/GamCommands.txt | 9 ++++++--- src/GamUpdate.txt | 7 +++++++ src/gam/__init__.py | 15 +++++++++------ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index f2a38121f..891827d95 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -3927,8 +3927,11 @@ gam print group-members [todrive *] updatetime ::= "(,)*" -gam create cigroup [copyfrom ] * - [makeowner] [alias|aliases ] [dynamic ] +gam create cigroup + [copyfrom ] * + [makeowner] [alias|aliases ] + [security|makesecuritygroup] + [dynamic ] gam update cigroup [copyfrom ] [security|makesecuritygroup| dynamicsecurity|makedynamicsecuritygroup| @@ -4515,7 +4518,7 @@ gam report users|user [todrive *] (country|countrycode ) gam create|add resoldcustomer (customer_auth_token ) + -gam update resoldcustomer [customer_auth_token ] + +gam update resoldcustomer + gam info resoldcustomer [formatjson] gam create|add resoldsubscription (sku ) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index ef7740f41..589fce7a6 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,10 @@ +7.03.04 + +Added option `security` to `gam create cigroup` that allows creation of a security group +in a single command. + +Updated to Python 3.13.2 where possible. + 7.03.03 Fixed bug in `gam update resoldcustomer` that caused the following error: diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 3e159c11d..5182f96fa 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ """ __author__ = 'GAM Team ' -__version__ = '7.03.03' +__version__ = '7.03.04' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -15106,7 +15106,7 @@ def doCreateResoldCustomer(): except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden, GAPI.invalid) as e: entityActionFailedWarning([Ent.CUSTOMER_DOMAIN, body['customerDomain']], str(e)) -# gam update resoldcustomer [customer_auth_token ] + +# gam update resoldcustomer + def doUpdateResoldCustomer(): res = buildGAPIObject(API.RESELLER) customerId = getString(Cmd.OB_CUSTOMER_ID) @@ -15133,6 +15133,7 @@ def doInfoResoldCustomer(): customerId=customerId) if not FJQC.formatJSON: printKeyValueList(['Customer ID', customerInfo['customerId']]) + printKeyValueList(['Customer Type', customerInfo['customerType']]) printKeyValueList(['Customer Domain', customerInfo['customerDomain']]) if 'customerDomainVerified' in customerInfo: printKeyValueList(['Customer Domain Verified', customerInfo['customerDomainVerified']]) @@ -31731,7 +31732,7 @@ def doCreateGroup(ciGroupsAPI=False): 'query': getString(Cmd.OB_QUERY)}) elif ciGroupsAPI and myarg == 'makeowner': initialGroupConfig = 'WITH_INITIAL_OWNER' - elif ciGroupsAPI and myarg == 'security': + elif ciGroupsAPI and myarg in {'security', 'makesecuritygroup'}: body['labels'][CIGROUP_SECURITY_LABEL] = '' elif myarg == 'verifynotinvitable': verifyNotInvitable = True @@ -34609,9 +34610,11 @@ def doPrintShowGroupTree(): if csvPF: csvPF.writeCSVfile('Group Tree') -# gam create cigroup [copyfrom ] -# [makeowner] [alias|aliases ] [dynamic ] -# [security] +# gam create cigroup +# [copyfrom ] +# [makeowner] [alias|aliases ] +# [security|makesecuritygroup] +# [dynamic ] def doCreateCIGroup(): doCreateGroup(ciGroupsAPI=True)