1.*************************************************************************** 2.* Software Testing Automation Framework (STAF) 3.* (C) Copyright IBM Corp. 2012 4.* 5.* This software is licensed under the Eclipse Public License (EPL) V1.0. 6.**************************************************************************** 7 8.*************************-START-OF-PROLOG-**************************** 9.* 10.* File Name : ConfigSrv SCRIPT 11.* Descriptive Name : Software Test Automation Framework Misc Service 12.* 13.* Detail: 14.* 15.* This file describes the STAF Config Service. 16.* 17.**************************-END-OF-PROLOG-***************************** 18:i1.config service 19:ih1.services 20:i2.config service 21:h2 id=configsrv.Config Service 22:h3.Description 23:p.The CONFIG service is one of the internal STAF services. It provides 24a way to save the current STAF configuration to a file, reflecting any 25changes made since STAFProc was started. 26:ul compact. 27:li.SAVE - Saves the current STAF configuration 28:li.&help. 29:eul. 30.* 31.*--------------------------------------------------------------------- 32.* 33:ih1.service commands 34:ih2.SAVE 35:i3.config service 36:h3.SAVE 37:p.SAVE will display the current STAF configuration data or save it to a file, 38reflecting any changes made since STAFProc was started. This includes any 39dynamic changes made by: 40:ul compact. 41:li.Adding/removing services dynamically via a :xph.SERVICE ADD:exph. request 42:li.Changing any operational settings via a :xph.MISC SET:exph., 43:xph.PROCESS SET:exph., :xph.FS SET:exph., or :xph.DIAG ENABLE/DISABLE:exph. 44request. 45:li.Changing any trust settings via a :xph.TRUST SET:exph. request. 46:li.Changing any trace settings via the :xph.TRACE:exph. service. 47:li.Changing any shutdown notifications via the :xph.SHUTDOWN:exph. service's 48:xph.NOTIFY REGISTER/UNREGISTER:exph. requests. 49:li.Setting any system or shared variables via the :xph.VAR:exph. service. 50Note that you can choose instead to save the same system/shared variables that 51were set in the STAF configuration file used when starting STAFProc. 52:eul. 53:h4.Syntax 54:xmp. 55SAVE [FILE <Name>] [VARS <Current | Startup>] 56:exmp. 57:p.:xph.FILE:exph. specifies that name of a file where you want to save 58the current STAF configuration data. This file cannot already exist. 59&varres. 60:p.:xph.VARS:exph. specifies which STAF system and shared variables to save. 61&varres. Recognized values are the following: 62:ul compact. 63:li.Current: This indicates to use the current STAF variables that exist in 64the system and shared variable pools 65:li.Startup: This indicates to use the STAF system and shared variables 66that were set via SET VAR staetments in the STAF configuration file used 67when starting STAFProc. 68:eul. 69 70:h4.Security 71:p.&seclvl. 3. 72:p.However, if the :xph.DEFAULTAUTHPASSWORD:exph. has been set for the 73:xph.PROCESS:exph. service, this command requires trust level 5. 74:h4.Return Codes 75:p.All return codes from SAVE are documented in :hdref refid=retcode.. 76:h4.Results 77:p.On successful return, if the :xph.FILE:exph. option is not specified, 78the result buffer will contain the current STAF configuration data. 79:p.On successful return, if the :xph.FILE:exph. option is specified, 80the result buffer will contain no data and the current STAF configuration data 81will be saved to the specified file name. 82:h4.Examples 83:p. 84:ul compact. 85:li.:hp2.Goal::ehp2. Save the current STAF configuration data to file 86/tmp/mySTAF.cfg. 87:p.:hp2.Syntax::ehp2. 88:p.:xph.SAVE FILE /tmp/mySTAF.cfg:exph. 89:p.:hp2.Results::ehp2. 90:xmp. 91:exmp. 92:p. 93:li.:hp2.Goal::ehp2. Save the current STAF configuration data to file 94/tmp/mySTAF.cfg using the STAF system/shared variables that were set 95at startup in the original STAF configuration file. 96:p.:hp2.Syntax::ehp2. 97:p.:xph.SAVE FILE /tmp/mySTAF.cfg VARS Startup:exph. 98:p.:hp2.Results::ehp2. 99:xmp. 100:exmp. 101:p. 102:li.:hp2.Goal::ehp2. Display the current STAF configuration data. 103:p.:hp2.Syntax::ehp2. 104:p.:xph.SAVE:exph. 105:p.:hp2.Results::ehp2. 106:xmp. 107# --------------------------------------------------------------------- 108# STAF Configuration File 109# --------------------------------------------------------------------- 110 111# --------------------------------------------------------------------- 112# Tracing 113# --------------------------------------------------------------------- 114 115TRACE ENABLE ALL SERVICES 116 117TRACE ENABLE TRACEPOINTS "ERROR WARNING DEPRECATED DEBUG" 118 119# --------------------------------------------------------------------- 120# Variables 121# --------------------------------------------------------------------- 122 123SET SYSTEM VAR STAFDemo/JavaAppClassPath=C:\STAF\lib\JSTAF.zip;C:\STAF\samples\demo\STAFDemo.jar; 124SET SYSTEM VAR STAFDemo/JavaAppCommand=javaw.exe 125 126# --------------------------------------------------------------------- 127# Operational Parameters 128# --------------------------------------------------------------------- 129 130SET MAXQUEUESIZE 1000 131SET MAXRETURNFILESIZE 5120 132 133# --------------------------------------------------------------------- 134# Interfaces (Connection Providers) 135# --------------------------------------------------------------------- 136 137INTERFACE ssl LIBRARY STAFTCP OPTION ConnectTimeout=5000 OPTION Port=6550 \ 138 OPTION Protocol=IPv4 OPTION Secure=Yes 139 140INTERFACE tcp LIBRARY STAFTCP OPTION ConnectTimeout=5000 OPTION Port=6500 \ 141 OPTION Protocol=IPv4 OPTION Secure=No 142 143# --------------------------------------------------------------------- 144# Trust Levels 145# --------------------------------------------------------------------- 146 147TRUST LEVEL 5 MACHINE *://client1.mycompany.com 148TRUST LEVEL 5 MACHINE *://client2.mycompany.com 149TRUST LEVEL 5 MACHINE *://server1.mycompany.com 150TRUST LEVEL 5 MACHINE local://local 151 152# --------------------------------------------------------------------- 153# Service Loader Service Registrations 154# --------------------------------------------------------------------- 155 156SERVICELOADER LIBRARY STAFDSLS 157 158# --------------------------------------------------------------------- 159# Service Registrations 160# --------------------------------------------------------------------- 161 162SERVICE STAX LIBRARY JSTAF EXECUTE C:\STAF\services\STAX.jar \ 163 OPTION JVMName=STAX OPTION J2=-Xmx512m \ 164 PARMS "CLEARLOGS Enabled FILECACHEALGORITHM LFU" 165 166SERVICE EVENT LIBRARY JSTAF EXECUTE C:\STAF\services\STAFEvent.jar \ 167 OPTION JVMName=STAX 168:exmp. 169:eul. 170.* 171.*--------------------------------------------------------------------- 172.* 173