Description
Registers, updates, deletes, displays a list and a history, and uploads and downloads assets managed by Systemwalker Software Configuration Manager.
Synopsis
[Windows]
swcfmg_repository.exe { -add -file <Path of asset info file> [-e <Character encoding>] | -update -file <Path of asset info file> [-e <Character encoding>] | -delete -id <Asset ID> | -list [-file <Output file path>] [-e <Character encoding>] [-scope <Asset scope>] | -history -id <Asset ID> [-file <Output file path>] [-e <Character encoding>] | -upload -id <Asset ID> -file <File path> [-comment <Comment>] | -download -id <Asset ID> [-revision <Asset version>] -dir <Output destination directory path> } |
[Linux]
swcfmg_repository { -add -file <Path of asset info file> [-e <Character encoding>] | -update -file <Path of asset info file> [-e <Character encoding>] | -delete -id <Asset ID> | -list [-file <Output file path>] [-e <Character encoding>] [-scope <Asset scope>] | -history -id <Asset ID> [-file <Output file path>] [-e <Character encoding>] | -upload -id <Asset ID> -file <File path> [-comment <Comment>] | -download -id <Asset ID> [-revision <Asset version>] -dir <Output destination directory path> } |
Options
Registers asset information using the data entered in the specified asset information file. The asset information file is in CSV format. For details on the asset information file, refer to "2.2.6 Asset Information File". To use the asset for configuration modification, it is necessary to upload the file. After registering the asset, upload the file using the "-upload" option.
Updates asset information using the data entered in the specified asset information file. The asset information file is in CSV format. For details on the asset information file, refer to "2.2.6 Asset Information File".
Deletes the asset specified using the asset ID. The asset ID can be checked using the "-list" option of this command.
Outputs asset information in CSV format.
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 output file, refer to "2.2.6 Asset Information File".
By specifying the options below, you can filter the asset information to be output. If no option has been specified, all asset information will be output.
Specify the scope of the asset to be output. For the scope of the tenant, specify the name of the tenant. For the global scope, specify "#GLOBAL".
For Linux, when specifying the global scope, the value must be enclosed with double quotes '"'.
Outputs asset history in CSV format. Specify the asset to display the asset ID and the asset history of.
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 output file, refer to "2.2.6 Asset Information File".
Uploads the file specified for the asset using the asset ID. Specify a file to upload to the file path. When uploading the file, the version of the asset is upgraded. Only files with names composed of a string up to 255 printable ASCII characters can be uploaded. When uploading a file for an asset for which a file has already been uploaded, use the same file name as the file of the previous version. The file name cannot be changed in the middle of operations. Specify the comment using up to 256 characters.
Downloads the asset specified using the asset ID and the asset version. When the asset version is omitted, the latest version of the asset is downloaded. Specify the output destination of the asset for the output destination directory path. Ensure that no files exist in the output directory, or an error will occur. The asset version can be checked with the asset history output using the "-history" option of this command.
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 asset ID, asset version, or tenant ID is incorrect. |
80 | As a configuration modification template or a job that uses the asset of the deletion target exists, the asset cannot be deleted. |
100 | Systemwalker Software Configuration Manager is not running. |
103 | Connection to the directory service failed. |
105 | Another operation is currently being executed on the target asset. |
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
[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.
This command can be executed at the same time as other commands.
[Linux]
This command can only be executed by the system administrator (superuser).
This command can be executed on the admin server.
This command can be executed at the same time as other commands.
Notes
Execute this command while Systemwalker Software Configuration Manager is running.
Multiple operations can only be executed for the same asset simultaneously when performing operations using the following combinations:
Operation During Execution | |||||||
---|---|---|---|---|---|---|---|
Registration | Update | Upload | Download (*1) | Deletion | List Display | ||
Operations | Registration | - | - | - | - | - | - |
Update | - | Yes | Yes | Yes | Yes | Yes | |
Upload | - | Yes | No | Yes (*) | No | Yes | |
Download (*1) | - | Yes | Yes (*) | Yes | No | Yes | |
Deletion | - | Yes | No | No | No | Yes | |
List display | - | Yes | Yes | Yes | Yes | Yes |
Yes: Can be executed simultaneously
Yes (*): Can be executed simultaneously if different versions are used
No: Cannot be executed simultaneously
-: The asset that is the operation target does not exist.
*1: Download operations can be performed not only when downloading an asset using this command, but also when executing the file transfer of a configuration modification job or script execution.
The asset information is newly registered in accordance with the asset information file.
Behavior is not guaranteed if the character encoding specified for this command does not match the character encoding specified for the asset information file. These character encodings must match.
Specify an asset ID that is unique within the product. An error will occur if an asset with the same ID already exists.
When updating registered asset information, it is recommended that you edit the listed file and use the edited file as the input data for update.
Use this command to delete an asset that is no longer required for Systemwalker Software Configuration Manager. When a file will be used after deleting the asset, download the asset in advance, and back up the file.
Assets being used for the processes of file distribution and script execution of configuration modification jobs cannot be deleted. After the relevant job is completed, delete the asset when the status of the job becomes "Completed", "Completed (abnormal)", or "Canceled".
The asset being used in the configuration modification template cannot be deleted. Delete the configuration modification template, and then delete the asset.
If no asset information is registered, only header information is output.
#asset-id,asset-name,file-name,scope,owner,description
If no file has been uploaded, only header information is output.
#asset-revision,size,comment,upload-date
When the size of the file to upload is large, the process may take some time.
When using the file to upload for file distribution or script execution of configuration modification, be careful about the number of characters in the file name. The number of characters that can be used for the name of the script file for script execution is 155 or less. The number of characters of the names of distributable files, including the characters of the distribution destination directory path, is 254 or less.
When the size of the file to download is large, the process may take some time.
If a CSV format asset information file is invalid, update of the asset 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 the available values, refer to "2.2.6 Asset Information File". |
Mandatory elements are not specified. | Enter the mandatory elements in the given line. |
The same asset is specified in another line. | The same asset information is already defined in one of the preceding lines. |
The asset id already exists. | The asset ID of the relevant line is already being used. |
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 asset does not exist. | There is no asset information corresponding to <asset-id> in the given line. Specify the ID of an existing asset. |
Example
Registration
[Windows]
swcfmg_repository.exe -add -file C:\work\assetinfo.csv |
[Linux]
swcfmg_repository -add -file /tmp/assetinfo.csv |
Update
[Windows]
swcfmg_repository.exe -update -file C:\work\assetinfo.csv |
[Linux]
swcfmg_repository -update -file /tmp/assetinfo.csv |
Deletion
[Windows]
swcfmg_repository.exe -delete -id 000000001 |
[Linux]
swcfmg_repository -delete -id 000000001 |
List
[Windows]
swcfmg_repository.exe -list -file C:\work\assetinfo.csv |
[Linux]
swcfmg_repository -list -file /tmp/assetinfo.csv |
History
[Windows]
swcfmg_repository.exe -history -id 000000001 -file C:\work\assethistory.csv |
[Linux]
swcfmg_repository -history -id 000000001 -file /tmp/assethistory.csv |
Upload
[Windows]
swcfmg_repository.exe -upload -id 000000001 -file C:\work\setup.exe |
[Linux]
swcfmg_repository -upload -id 000000001 -file /tmp/setup.exe |
Download
[Windows]
swcfmg_repository.exe -download -id 000000001 -dir C:\work\asset |
[Linux]
swcfmg_repository -download -id 000000001 -file /tmp/asset |