Create scripts in the following format.
[Windows Manager]
Installation_folder\SVROR\Manager\etc\user_script
[Linux Manager]
/etc/opt/FJSVrcvmr/user_scripts
Execution_order_resource_name_execution_timing-arbitrary_line.extension
Specify as follows:
Items | Content of Description |
---|---|
Execution order | Describe the script execution order. Specify a two-digit integer. When specifying the same execution order in multiple scripts, the order is not guaranteed. |
Resource name | For details on resource names, refer to "Names of Resources and Operations which are the Targets of Script Startup before and after Operations". |
Execution timing | When executing scripts either before or after operations start, specify as follows:
For details on operation names, refer to "Names of Resources and Operations which are the Targets of Script Startup before and after Operations". |
Arbitrary character string (optional) | Specify the arbitrary character string without using blank spaces. Any characters except blank spaces can be used for the filename, and its length can be up to the maximum character string length supported by the OS. When deploying multiple scripts for the same operation, users can specify a character string to distinguish the usage of the script. |
Extension | [Windows Manager] [Linux Manager] |
Example
Name of script for operations before cancelling an L-Platform
00_lplatform_pre_delete.bat
Name of script for operations after applying for an L-Platform
00_lplatform_post_create.bat
Name of script for operations after creating an L-Server
01_lserver_post_create-sample.bat
Name of script for operations before stopping an L-Server
00_lserver_pre_stop.sh
Names of Resources and Operations which are the Targets of Script Startup before and after Operations
The names of resources and operations which are the targets of script startup before and after operations are as follows:
Resource Name | Operation Name | Remarks | |
---|---|---|---|
lplatform | Subscribe to a New L-Platform | create | - |
L-Platform Reconfiguration (When L-Server is added) | create | When by one operation multiple L-Servers are added, script executes number of addition L-Servers. | |
L-Platform Reconfiguration (When L-Server is deleted) | delete | When by one operation multiple L-Servers are deleted, script executes number of deleted L-Servers. | |
Cancel an L-Platform | delete | - | |
power on for all servers in the L-Platform | start | - | |
power off for all servers in the L-Platform | stop | - | |
lserver (common to physical L-Servers and virtual L-Servers) | Creating an L-Server | create | When executing rcxadm lserver create, or creating an L-Server using the [Resource] tab. |
Deleting an L-Server | delete | When executing rcxadm lserver create, or creating an L-Server using the [Resource] tab. | |
Starting an L-Server | start | The operation is not executed during start all operations. | |
Stopping an L-Server | stop | The operation is not executed during stop all operations. | |
tenant | Creating an Tenant | create | When by one operation multiple Tenants are added, script execute number of addition Tenants. |
Deleting an Tenant | delete | - | |
Modifying an Tenant | modify | When all the tenants are chosen, script execute number of addition Tenants. | |
power on for all servers in the Tenant | start | When all the tenants are chosen, script execute number of addition Tenants. | |
power off for all servers in the Tenant | stop | - |
Exit Status
This command returns the following values:
The command executed successfully.
An error has occurred.
Standard Output and Errors
Standard output and errors are output in the following folders:
[Windows Manager]
Installation_folder\Manager\var\script_log
[Linux Manager]
/opt/FJSVrcvmr/var/script_log
Standard output and errors are output in the folders with the following names:
Standard Output
Output_date_script_name_stdout.txt
Standard Error
Output_date_script_name_stderr.txt
Output_date is in the following format.
YYYY-MM-DD HH-MM-SS
When the same scripts are executed at the same time, the file name ends with -X.
X is a sequential number starting from "1".
Temporary Files
Scripts are used to output information as temporary files when events occur.
For details on output data, refer to "Table B.3 Meanings and Values of Variables".
[Windows Manager]
Installation_folder\Manager\var\tmp\rcxtempfile
[Linux Manager]
/opt/FJSVrcvmr/var/tmp/rcxtempfile
Execution timing.xx.xx
The execution timing is the values specified in "Table B.1 List of Items Specified in Scripts".
xx.xx is in the following format:
Manager_process_ID.Numbers_created_randomly_not_to_overlap
The file name above with the full path name is created as the first argument.
It is not necessary to consider the file names in the script files, if loading the file name using the argument created the above.
The information which user scripts will receive is as follows:
Temporary files are output in the following format.
Variable name= Value |
Line break codes are as follows:
[Windows Manager]
CR+LF
[Linux Manager]
LF
The meanings and values of variables are as follows:
Variable | Meaning | Value |
---|---|---|
EVENT | Character string displayed in the event column of ROR console when an event occurs | Character string enclosed by double quotes (") |
PROGRESS | Timing at which an event occurs |
|
TASK_ID | Task ID which is the target of operation | Character string enclosed by double quotes (") When the operation target is not a task: "" |
RESOURCE_NAME | Name of the resource which is the target of operation | Character string enclosed by double quotes (") |
RESOURCE_TYPE | Type of the resource which is the target of operation | Character string enclosed by double quotes (") |
RESOURCE_ID | ID of the resource which is the target of operation | Character string enclosed by double quotes (") |
TENANT_NAME | Name of the tenant which is the target of operation | Character string enclosed by double quotes (")
|
TENANT_ID | ID of the tenant which is the target of operation | Character string enclosed by double quotes (")
|
TIME | Time an event occurred | YYYY-MM-DD HH:MM:SS |
CLIENT_IP | IP address of the client executing an operation using the [Resource] tab. | XX.XX.XX.XX
|
USER_ID | ID of the user executing an operation | Character string enclosed by double quotes (")
|
USER_NAME | Name of the user executing an operation | Character string enclosed by double quotes (")
|
USER_GROUP_ID | User group ID | Character string enclosed by double quotes (")
|
USER_GROUP_NAME | User group name which the user executed operations belongs to | Character string enclosed by double quotes (")
|
OWNER | The name of the user who owns the target resource | Character string enclosed by double quotes (")
|
FULL_NAME | Unique name of the resource which is the target of operation | Character string enclosed by double quotes (")
|
FOLDER_TYPE | Folder type is the target of operation | Character string enclosed by double quotes (")
|