diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 87fbbef8..759ec6d3 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -11701,7 +11701,7 @@ def ProcessGAMCommand(args): gapi_cloudidentity_inboundsso.delete_profile() elif argument in ['nickname', 'alias']: doDeleteAlias() - elif argument == 'org': + elif argument in ['org', 'ou', 'orgunit']: gapi_directory_orgunits.delete() elif argument in ['inboundssocredential', 'inboundssocredentials']: gapi_cloudidentity_inboundsso.delete_credentials() diff --git a/src/gam/gapi/directory/orgunits.py b/src/gam/gapi/directory/orgunits.py index 92e1cbcb..ef0b404d 100644 --- a/src/gam/gapi/directory/orgunits.py +++ b/src/gam/gapi/directory/orgunits.py @@ -37,9 +37,7 @@ def _getAllParentOrgUnitsForUser(user, cd=None): def create(): cd = gapi_directory.build() - print(f'sys.arg: {sys.argv[3]}') name = getOrgUnitItem(sys.argv[3], pathOnly=True, absolutePath=False) - print(f'name: {name}') parent = '' body = {} i = 4 @@ -69,15 +67,12 @@ def create(): orgUnitPath = parent + name else: orgUnitPath = parent + '/' + name - print(f'orgunitPath: {orgUnitPath}') if orgUnitPath.count('/') > 1: body['parentOrgUnitPath'], body['name'] = orgUnitPath.rsplit('/', 1) else: body['parentOrgUnitPath'] = '/' body['name'] = orgUnitPath[1:] parent = body['parentOrgUnitPath'] - print('DEBUG DEBUG DEBUG') - print(f'body: {body}') gapi.call(cd.orgunits(), 'insert', customerId=GC_Values[GC_CUSTOMER_ID],