Description
Creates, updates, performs batch update, deletes, and displays a list and a history of the configuration modification information managed by Systemwalker Software Configuration Manager.
Synopsis
[Windows]
swcfmg_changetemplate.exe { -add [-id <Configuration modification template ID>] -name <Configuration modification template name> -userid <Administrator> -scope <Scope> [-description <Description>] -file <Configuration modification template definition file path> | -update -id <Configuration modification template ID> [-name <Configuration modification template name>] [-userid <Administrator>] [-scope <Scope>] [-description <Description>] [-file <Configuration modification template information file path>] | -batchupdate -csv <Configuration modification template information file path> [-e <Character encoding>] } | -delete -id <Configuration modification template ID>, | -list [-csv <Output file path>] [-e <Character encoding>] [-scope Scope] | -get -id <Configuration modification template ID> [-file <Output file path>] | } |
[Linux]
swcfmg_changetemplate { -add [-id <Configuration modification template ID>] -name <Configuration modification template name> -userid <Administrator> -scope <Scope> [-description <Description>] -file <Configuration modification template definition file path> | -update -id <Configuration modification template ID> [-name <Configuration modification template name>] [-userid <Administrator>] [-scope <Scope>] [-description <Description>] [-file <Configuration modification template information file path>] | -batchupdate -csv <Configuration modification template information file path> [-e <Character encoding>] } | -delete -id <Configuration modification template ID>, | -list [-csv <Output file path>] [-e <Character encoding>] [-scope Scope] | -get -id <Configuration modification template ID> [-file <Output file path>] | } |
Options
Creates a configuration modification template. Specify the ID of the configuration modification template to update, the administrator, the scope, and a description. When the configuration modification template ID is omitted, the ID, which does not use a serial number starting from 000000001, is automatically allocated. For the "-file" option, specify the path of a configuration modification template definition file with its definitions described. For details on the configuration modification template definition file, refer to "2.2.8 Configuration Modification Template Definition Files".
Update the configuration modification template specified using the configuration modification template ID. Specify the name of the configuration modification template to update, the administrator, the scope, and a description. When updating the definition of a configuration modification template, specify the path of the configuration modification template definition file with its definitions described for the "-file" option. For details on the definition file of the configuration modification template, refer to "2.2.8 Configuration Modification Template Definition Files". The items corresponding to the omitted option are not updated.
Uses the description of the configuration modification template information file to perform batch update of multiple sets of configuration modification template information. The configuration modification template information file is in CSV format For details on the configuration modification template information file, refer to "2.2.7 Configuration Modification Template Information File". Definitions of configuration modification templates cannot be updated using this option. To update definitions, use the "-update" option of this command.
Deletes the configuration modification template specified using the configuration modification template ID. Multiple configuration modification template IDs can be specified by delimiting them with ',' (comma). Use the "-list" option of this command to check the configuration modification template ID.
Outputs configuration modification template information in CSV format.
If -csv <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. 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.
For details on the output file, refer to "2.2.7 Configuration Modification Template Information File".
By specifying the options below, you can filter the configuration modification template information to be output. If no option has been specified, all information of the configuration modification template will be output.
Specify the scope of the configuration modification template to output. For the scope of the tenant, specify the tenant ID. For the global scope, specify "#GLOBAL".
For Linux, when specifying the global scope, the value must be enclosed with double quotes '"'.
Outputs the definition of the configuration modification template specified using the configuration modification template ID.
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. 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.
For details on the definition file of the configuration modification template, refer to "2.2.8 Configuration Modification Template Definition Files".
Specify the character encoding for the file.
The following character encoding can be specified. Use uppercase letters.
UTF-8
If this option is omitted, the character encoding for the environment in which this command is to be executed will be used in the input file.
Return value
Return value | Meaning |
---|---|
0 | The command has terminated normally. |
10 | A parameter error has occurred. |
20 | The specified I/O path is incorrect. |
30 | The specified character encoding is incorrect. |
50 | The file description is incorrect. |
70 | The specified configuration modification template ID, user ID, or tenant ID is incorrect. |
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. |
103 | Connection to the directory service failed. |
110 | A write error has occurred. |
200 | Setup has not been performed. |
255 | A system error has occurred. |
Command location
[Windows]
[Systemwalker Software Configuration Manager installation directory]\SWCFMGM\bin |
[Linux]
/opt/FJSVcfmgm/bin |
Privilege required
[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.
Note
Execute this command while Systemwalker Software Configuration Manager is running.
Specify the configuration modification template ID using a 9-digit integer in the range of 000000001 - 999999999.
Specify the configuration modification template name using up to 85 characters (<, >, &, ", ', and | cannot be used).
Specify the description using up to 256 characters.
When using the scope of the tenant, specify the tenant ID of an existing tenant. For the global scope, specify "#GLOBAL".
The user that can be specified by the administrator differs according to the scope. For the tenant scope, specify the infrastructure administrator, the dual-role administrator, or the tenant administrator or tenant user within the tenant. For the global scope, specify the infrastructure administrator or the dual-role administrator.
Specify a configuration modification template ID that is unique within the product. An error will occur if a configuration modification template with the same ID already exists.
In the configuration modification template definition file, all parameters defined in parameter elements must be used somewhere in the setting information.
When updating already created configuration modification template definitions, it is recommended that you edit the defined file and use the edited file as the input data for update.
In the configuration modification template definition file, all parameters defined in parameter elements must be used somewhere in the setting information.
Correct operation is not guaranteed if the character encoding specified for this command does not match the character encoding specified for the configuration modification template information file. These character encodings must match.
When updating already created configuration modification template information, it is recommended that you edit the listed file and use the edited file as the input data for batch update.
If no configuration modification template information is created, only header information is output.
#template-id,template-name,scope,owner,description
Use this command to delete configuration modification templates that are no longer required for Systemwalker Software Configuration Manager.
If a CSV format configuration modification template information file is invalid, batch update of the configuration modification template information will be canceled.
CFMGC2005 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. |
The specified elements are invalid. () | The values of elements within "()" in the given line are invalid. Enter the correct values For details on available values, refer to "2.2.7 Configuration Modification Template Information File". |
Mandatory elements are not specified. | Enter the mandatory elements in the given line. |
The same template is specified in another line. | The same configuration modification template information is already defined in one of the preceding lines. |
The specified user does not exist. | There is no user corresponding to "owner" in the given line. Specify the ID of an existing user. |
The specified tenant does not exist. | The tenant, <scope>, in the given line does not exist. Specify a tenant that already exists, or "#GLOBAL". |
The specified template does not exist. | There is no configuration modification template information corresponding to <template-id> in the given line. Specify a configuration modification template ID that already exists |
Notes on creation and update errors
If the setting information value of the XML format configuration modification template definition file is invalid, the following error message is output.
CFMGC30658 A value in the settings information of the configuration modification template is incorrect. [Setting information: Setting information][Value: Value][Cause: Cause]
One of the following messages will be output in <Cause>:
Setting Information | Cause | Meaning |
---|---|---|
target: target monitorTime: monitoring time script: script distributionFile: distribution file successValues: normal return value | The value is invalid. | An invalid value. When specifying an asset, specify it in the following format: media://[Asset ID]/[Asset version] |
target: target monitorTime: monitoring time script: script distributionFile: distribution file | Fixed value and parameter cannot both be specified. | Both the fixed value and the parameter are specified. |
argument: argument command: command destinationDirectory: distribution destination collectionFile: collection file storageDirectory: storage location | The number of characters of value is invalid. | The number of characters is invalid. |
The value contains invalid characters. | Unavailable characters are included. |
Example
Creation
[Windows]
swcfmg_changetemplate.exe -add -name "Installation of software A" -userid user001 -scope tenant1 -description "Install the software A". -file C:\work\templatedef.xml |
[Linux]
swcfmg_changetemplate -add -name "Installation of software A" -userid user001 -scope tenant1 -description "Install the software A". -file /tmp/templatedef.xml |
Update
[Windows]
swcfmg_changetemplate.exe -update -id 000000001 -file C:\work\templatedef.xml |
[Linux]
swcfmg_changetemplate -update -id 000000001 -file /tmp/templatedef.xml |
Batch update
[Windows]
swcfmg_changetemplate.exe -batchupdate -csv C:\work\templateinfo.csv |
[Linux]
swcfmg_changetemplate -batchupdate -csv /tmp/templateinfo.csv |
Deletion
[Windows]
swcfmg_changetemplate.exe -delete -id 000000001 |
[Linux]
swcfmg_changetemplate -delete -id 000000001 |
List
[Windows]
swcfmg_changetemplate.exe -list -csv C:\work\templateinfo.csv |
[Linux]
swcfmg_changetemplate -list -csv /tmp/templateinfo.csv |
Definition
[Windows]
swcfmg_changetemplate.exe -get -id 000000001 -file C:\work\templatedef.xml |
[Linux]
swcfmg_changetemplate -get -id 000000001 -file /tmp/templatedef.xml |