-
Notifications
You must be signed in to change notification settings - Fork 0
/
Generate_User_Data_For_Automation.cmd
45 lines (38 loc) · 1.72 KB
/
Generate_User_Data_For_Automation.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
set /a cnt=-1
setlocal ENABLEDELAYEDEXPANSION
for /f "tokens=1-6 delims=," %%A in (User_Info.csv) do (
set /a cnt=cnt+1
@REM echo on
echo. >>automation.properties
echo ##Creating MDM User for !cnt! - %%C %%D >>automation.properties
echo MDM.new.user.firstname!cnt!=%%C>>automation.properties
echo MDM.new.user.middlename!cnt!=>>automation.properties
echo MDM.new.user.lastname!cnt!=%%D>>automation.properties
echo MDM.new.user.username!cnt!=%%B>>automation.properties
echo MDM.new.user.password!cnt!=%%B1>>automation.properties
echo MDM.new.user.email!cnt!=%%A>>automation.properties
echo MDM.new.user.isExternalAuthentication!cnt!=N>>automation.properties
echo MDM.new.user.isAdministrator!cnt!=Y>>automation.properties
echo MDM.user_ors_rel.username!cnt!=%%B>>automation.properties
echo MDM.user_ors_rel.databaseIds!cnt!=orcl-TCR_HUB_NEW>>automation.properties
echo MDM.user_roles_rel.username!cnt!=%%B>>automation.properties
echo MDM.user_roles_rel.roles!cnt!=%%E>>automation.properties
echo MDM.user_roles_rel.databaseId!cnt!=orcl-TCR_HUB_NEW>>automation.properties
echo MDM.delete.user.username!cnt!=%%B>>automation.properties
)
echo. >>automation.properties
set /a cnt=cnt+1
echo MDM.number.of.new.users=!cnt!>>automation.properties
echo MDM.number.of.user_ors_relationships=!cnt!>>automation.properties
echo MDM.number.of.user_roles_relationships=!cnt!>>automation.properties
echo MDM.number.of.delete.users=!cnt!>>automation.properties
echo. >>automation.properties
echo ##Done >>automation.properties
@REM call AcquireReleaseLock.cmd
@REM call CreateUsers.cmd
@REM call AssignUsersToDatabases.cmd
@REM call AssignRolesToUser.cmd
@REM call AcquireReleaseLock.cmd
@REM call DeleteUsers.cmd
endlocal