Description
Adds, updates, deletes, lists, and acquires predefined parameters in parameter management. Also, uploads or downloads the parameter packages associated with predefined parameters.
Use a parameter information file as the input file for adding, updating, and acquiring. The parameter information file exists in either CSV format as a parameter information CSV file or in XML format as a parameter information XML file (refer to "Definition of Parameter Information" in the Developer's Guide for details).
Use a parameter package file for uploading and downloading. The parameter package file is a zip file (refer to "Definition of Parameter Information" in the Developer's Guide for details).
Synopsis
[Windows]
swcfmg_param_predef.exe { -add -sdefid <Parameter settings definition ID> -file <Parameter information CSV file path> [-e <Character encoding>] | -add -sdefid <Parameter settings definition ID> -xml <Parameter information XML file path> | -update -id <Parameter information ID> -file <Parameter information CSV file path> [-e <Character encoding>] | -update -id <Parameter information ID> -xml <Parameter information XML file path> | -delete -id <Parameter information ID>,... | -list [-sdefid <Parameter settings definition ID>] [-file <Output file path>] [-e <Character encoding>] | -get -id <Parameter information ID> -file <Output file path> [-e <Character encoding>] | -get -id <Parameter information ID> -xml <Output file path>" | -upload -id <Parameter information ID> -file <Parameter package file path> | -download -id <Parameter information ID> -dir <Output directory path> } |
[Linux]
swcfmg_param_predef { -add -sdefid <Parameter settings definition ID> -file <Parameter information CSV file path> [-e <Character encoding>] | -add -sdefid <Parameter settings definition ID> -xml <Parameter information XML file path> | -update -id <Parameter information ID> -file <Parameter information CSV file path> [-e <Character encoding>] | -update -id <Parameter information ID> -xml <Parameter information XML file path> | -delete -id <Parameter information ID>,... | -list [-sdefid <Parameter settings definition ID>] [-file <Output file path>] [-e <Character encoding>] | -get -id <Parameter information ID> -file <Output file path> [-e <Character encoding>] | -get -id <Parameter information ID> -xml <Output file path>" | -upload -id <Parameter information ID> -file <Parameter package file path> | -download -id <Parameter information ID> -dir <Output directory path> } |
Options
Adds predefined parameters using the specified parameter information CSV file. Predefined parameters are associated with the parameter settings definition of the specified parameter settings definition ID. The input file is a parameter settings definition CSV file.
A parameter information ID is generated for the newly added predefined parameter. Outputs this ID to standard output.
Format of ID to be generated
The predefined parameter is automatically assigned a number according to the following rule:
PM (prefix) + 8-digit number Example: PM00000001
Output format for standard output
The parameter information ID is output in the following format:
[<Parameter information ID>]
The input file is a parameter settings definition XML file. Otherwise operates the same as the above option.
Updates the predefined parameter for the parameter information ID using the specified parameter information CSV file. The input file is a parameter settings definition CSV file.
The input file is a parameter information XML file. Otherwise operates the same as the above option.
Deletes the predefined parameter from the parameter information ID. Multiple parameter information IDs can be specified by delimiting them with ',' (comma).
Uses a predefined parameter list file in CSV format to output a list of registered predefined parameters.
-setid Outputs a list of only those predefined parameters that are associated with the parameter settings definition IDs
If -file <Output file path> is omitted, information will be output to the standard output for the command.
If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten.
If the file cannot be output because of an error, either a new file will not be created or, if an existing file was to be overwritten, the existing file will be kept as it is, without being overwritten.
Output format for standard output
Outputs the list of predefined parameters in the following format:
Item No. | Item | Remarks |
---|---|---|
1 | Parameter settings definition ID | Outputs the parameter settings definition IDs associated with the parameter information. |
2 | Parameter information ID | Outputs the parameter information ID for the predefined parameters. |
3 | Parameter information name | Outputs the parameter information name for the predefined parameters. |
4 | Parameter package file name | Outputs the name of the parameter package file. |
Header format
Insert the header in the first line of the CSV file using the format shown below. The header is output even if there is no information to be output to the file.
#Parameter settings definition ID,Parameter information ID,Parameter information name,Package name |
Outputs the predefined parameter for the parameter information ID to the specified output file path. The output file is a parameter information CSV file.
If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten.
If the file cannot be output because of an error, either a new file will not be created or, if an existing file was to be overwritten, the existing file will be kept as it is, without being overwritten.
The output file is a parameter information XML file. Otherwise operates the same as the above option.
Uploads the parameter package to the predefined parameter for the parameter information ID. The input file is a parameter package zip file.
Parameter packages that can be uploaded are subject to the following conditions. An error will occur if conditions other than these are used.
File extension must be .zip.
Ensure that the file extension is .zip.
File size must be no greater than 2 MB.
The maximum uploadable file size is 2 MB.
Downloads the parameter package registered in the predefined parameter of the parameter information ID. Outputs parameter package zip files to the output directory path.
Ensure that no files exist in the output directory, or an error will occur.
Specify the character encoding for the file.
The character encodings below can be specified (single-byte uppercase characters must be used):
UTF-8
If this option is omitted, the character encoding of the execution environment of this command will be used.
Return value
Return value | Meaning |
---|---|
0 | Completed normally. |
10 | A parameter error has occurred. |
20 | The specified I/O path is incorrect. |
30 | The specified character encoding is incorrect. |
40 | Unable to analyze the file. |
50 | The file description is incorrect. |
70 | The specified ID does not exist. |
72 | The package has not been registered in the specified ID. |
73 | The package has not been correctly registered in the specified ID. |
100 | Systemwalker Software Configuration Manager is not running. |
101 | A command that cannot be executed at the same time as this command is already running. |
102 | You do not have the privileges required to execute this command. |
110 | A write error has occurred. |
120 | There is not enough free disk space for the media library. |
200 | Setup has not been performed. |
255 | A system error has occurred. |
Command location
Admin server
[Windows]
<Systemwalker Software Configuration Manager installation directory>\SWCFMGM\bin |
[Linux]
/opt/FJSVcfmgm/bin |
Privilege required/execution environment
[Windows]
Administrator privileges are required. Execute as an administrator.
This command can be executed on the admin server.
[Linux]
This command can only be executed by the system administrator (superuser).
This command can be executed on the admin server.
Notes
This command cannot be executed at the same time as other commands. An exclusive control error will occur if a command is executed while another command is still executing.
Execute this command while Systemwalker Software Configuration Manager is running.
Use this command to delete information about predefined parameters that no longer need to be managed by Systemwalker Software Configuration Manager.
If no predefined parameters have been registered, only the header information will be output.
#Parameter settings definition ID,Parameter information ID,Parameter information name,Package name |
If a CSV format parameter information file is invalid, the registration and update of the predefined parameters will be canceled and the following error message will be output:
The file description is incorrect. [Line number:<n>](Cause:<Cause>) |
One of the following messages will be output in <Cause>:
Message | Meaning |
---|---|
Number of elements. | Review the number of elements in the line indicated. |
Mandatory elements are not specified. | Does not match CSV format. Enter in correct format. |
The key element is invalid. | The value specified in the parameter status is incorrect. Enter in correct format. |
The status element is invalid. | The value specified in the parameter key is incorrect. Enter in correct format. |
The number of characters of name element is invalid. | The number of characters in the name is invalid. Enter a valid number of characters. |
The number of characters of description element is invalid. | The number of characters in the description is invalid. Enter a valid number of characters. |
The number of characters of key element is invalid. | The number of characters in the key is invalid. Enter a valid number of characters. |
The number of characters of value element is invalid. | The number of characters in the value is invalid. Enter a valid number of characters. |
If an XML format parameter information file is invalid, the registration and update of the predefined parameters will be canceled and the following error message will be output:
An error occurred during XML file validation. [Details:<Cause>)] |
Examples
Add
[Windows]
swcfmg_param_predef.exe -add -sdefid SS00000001 -file C:\work\parampredef.xml |
[Linux]
swcfmg_param_predef -add -sdefid SS00000001 -file /tmp/parampredef.xml |
Update
[Windows]
swcfmg_param_predef.exe -update -id PM00000001 -file C:\work\parampredef.xml |
[Linux]
swcfmg_param_predef -update -id PM00000001 -file /tmp/parampredef.xml |
Delete
[Windows]
swcfmg_param_predef.exe -delete -id PM00000001 |
[Linux]
swcfmg_param_predef -delete -id PM00000001 |
List
[Windows]
swcfmg_param_predef.exe -list |
[Linux]
swcfmg_param_predef -list |
Acquire
[Windows]
swcfmg_param_predef.exe -get -id PM00000001 -file C:\work\parampredef.xml |
[Linux]
swcfmg_param_predef -get -id PM00000001 -file /tmp/parampredef.xml |
Upload
[Windows]
swcfmg_param_predef.exe -upload -id PM00000001 -file C:\work\parampredef.zip |
[Linux]
swcfmg_param_predef -upload -id PM00000001 -file /tmp/parampredef.zip |
Download
[Windows]
swcfmg_param_predef.exe -download -id PM00000001 -dir C:\work\parampredef |
[Linux]
swcfmg_param_predef -download -id PM00000001 -dir /tmp/parampredef |