mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Make print|show oushareddrives consistent with other commands (#1507)
This commit is contained in:
@@ -1488,6 +1488,9 @@ gam update feature <Name> name <Name>
|
|||||||
gam delete feature <Name>
|
gam delete feature <Name>
|
||||||
gam print features [todrive]
|
gam print features [todrive]
|
||||||
|
|
||||||
|
gam show oushareddrives|orgunitshareddrives [ou|org|orgunit <OrgUnitItem>]
|
||||||
|
gam print oushareddrives|orgunitshareddrives [todrive] [ou|org|orgunit <OrgUnitItem>]
|
||||||
|
|
||||||
gam create resource <ResourceID> <Name> <ResourceAttribute>*
|
gam create resource <ResourceID> <Name> <ResourceAttribute>*
|
||||||
gam update resource <ResourceID> <ResourceAttribute>*
|
gam update resource <ResourceID> <ResourceAttribute>*
|
||||||
gam delete resource <ResourceID>
|
gam delete resource <ResourceID>
|
||||||
|
|||||||
@@ -33,20 +33,20 @@ def move_shared_drive(driveId, orgUnit):
|
|||||||
body=body)
|
body=body)
|
||||||
|
|
||||||
def printshow_orgunit_shared_drives(csvFormat):
|
def printshow_orgunit_shared_drives(csvFormat):
|
||||||
try:
|
|
||||||
orgunit = sys.argv[3]
|
|
||||||
except IndexError:
|
|
||||||
orgunit = '/'
|
orgunit = '/'
|
||||||
if csvFormat:
|
if csvFormat:
|
||||||
todrive = False
|
todrive = False
|
||||||
csvRows = []
|
csvRows = []
|
||||||
titles = ['name']
|
titles = ['name']
|
||||||
i = 4
|
i = 3
|
||||||
while i < len(sys.argv):
|
while i < len(sys.argv):
|
||||||
myarg = sys.argv[i].lower()
|
myarg = sys.argv[i].lower()
|
||||||
if csvFormat and myarg == 'todrive':
|
if csvFormat and myarg == 'todrive':
|
||||||
todrive = True
|
todrive = True
|
||||||
i += 1
|
i += 1
|
||||||
|
elif myarg in ['ou', 'org', 'orgunit']:
|
||||||
|
orgunit = sys.argv[i + 1]
|
||||||
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(sys.argv[i],
|
controlflow.invalid_argument_exit(sys.argv[i],
|
||||||
f"gam {['show', 'print'][csvFormat]} oushareddrives")
|
f"gam {['show', 'print'][csvFormat]} oushareddrives")
|
||||||
|
|||||||
Reference in New Issue
Block a user