Skip to content

Commit

Permalink
Added option security to gam create cigroup
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Feb 4, 2025
1 parent 30c3d14 commit 0ec2e83
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
with:
path: |
cache.tar.xz
key: gam-${{ matrix.jid }}-20250119
key: gam-${{ matrix.jid }}-20250204

- name: Untar Cache archive
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: taers232c.GAMADV-XTD3
release-tag: v7.03.03
release-tag: v7.03.04
max-versions-to-keep: 1 # keep only latest versions
installers-regex: '\.msi$'
token: ${{ secrets.WINGET_TOKEN }}
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ script:
before_deploy:
# Comment out for Linux Xenial and Trusty
#- yes | gem update --system --force
#- gem install bundler
#- gem install faraday-net_http -v '3.3.0' # Fix faraday version
#- gem install uri
#- gem install logger
- gem install bundler
- gem install faraday-net_http -v '3.3.0' # Fix faraday version
- gem install uri
- gem install logger
- export TRAVIS_TAG="preview"
- unset LD_LIBRARY_PATH

Expand All @@ -115,8 +115,8 @@ deploy:
# Linux 64-Bit Bionic and Linux ARM64 Focal and Linux ARM64 Bionic and Linux ARM64 Xenial
# edge: true
# Linux Xenial and Trusty
edge:
branch: v2.0.3-beta.4
# edge:
# branch: v2.0.3-beta.4
# branch: v2.0.5-beta.1
on:
repo: taers232c/GAMADV-XTD3
Expand Down
9 changes: 6 additions & 3 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +3927,11 @@ gam print group-members [todrive <ToDriveAttribute>*]
updatetime
<CIGroupFieldNameList> ::= "<CIGroupFieldName>(,<CIGroupFieldName>)*"

gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>*
[makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
gam create cigroup <EmailAddress>
[copyfrom <GroupItem>] <GroupAttribute>*
[makeowner] [alias|aliases <CIGroupAliasList>]
[security|makesecuritygroup]
[dynamic <QueryDynamicGroup>]
gam update cigroup <GroupEntity> [copyfrom <GroupItem>] <GroupAttribute>
[security|makesecuritygroup|
dynamicsecurity|makedynamicsecuritygroup|
Expand Down Expand Up @@ -4515,7 +4518,7 @@ gam report users|user [todrive <ToDriveAttribute>*]
(country|countrycode <String>)

gam create|add resoldcustomer <CustomerDomain> (customer_auth_token <String>) <ResoldCustomerAttribute>+
gam update resoldcustomer <CustomerID> [customer_auth_token <String>] <ResoldCustomerAttribues>+
gam update resoldcustomer <CustomerID> <ResoldCustomerAttribues>+
gam info resoldcustomer <CustomerID> [formatjson]

gam create|add resoldsubscription <CustomerID> (sku <SKUID>)
Expand Down
7 changes: 7 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
14 changes: 10 additions & 4 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

__author__ = 'Ross Scroggs <[email protected]>'
__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
Expand Down Expand Up @@ -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 <CustomerID> [customer_auth_token <String>] <ResoldCustomerAttribute>+
# gam update resoldcustomer <CustomerID> <ResoldCustomerAttribute>+
def doUpdateResoldCustomer():
res = buildGAPIObject(API.RESELLER)
customerId = getString(Cmd.OB_CUSTOMER_ID)
Expand All @@ -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']])
Expand Down Expand Up @@ -31731,6 +31732,8 @@ def doCreateGroup(ciGroupsAPI=False):
'query': getString(Cmd.OB_QUERY)})
elif ciGroupsAPI and myarg == 'makeowner':
initialGroupConfig = 'WITH_INITIAL_OWNER'
elif ciGroupsAPI and myarg in {'security', 'makesecuritygroup'}:
body['labels'][CIGROUP_SECURITY_LABEL] = ''
elif myarg == 'verifynotinvitable':
verifyNotInvitable = True
else:
Expand Down Expand Up @@ -34607,8 +34610,11 @@ def doPrintShowGroupTree():
if csvPF:
csvPF.writeCSVfile('Group Tree')

# gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>
# [makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
# gam create cigroup <EmailAddress>
# [copyfrom <GroupItem>] <GroupAttribute>
# [makeowner] [alias|aliases <CIGroupAliasList>]
# [security|makesecuritygroup]
# [dynamic <QueryDynamicGroup>]
def doCreateCIGroup():
doCreateGroup(ciGroupsAPI=True)

Expand Down

0 comments on commit 0ec2e83

Please sign in to comment.