Top
Systemwalker Software Configuration Manager Reference Guide
FUJITSU Software

1.2.8 swcfmg_repository (Asset Information Management Command)

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

-add -file <Path of asset information file>

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.

-update -file <Path of asset information file>

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".

-delete -id <Asset ID>

Deletes the asset specified using the asset ID. The asset ID can be checked using the "-list" option of this command.

-list [-file <Output file path>]

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.

[-scope Scope]

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 '"'.

-history -id <Asset ID> [-file <Output file path>] [-e <Character encoding>]

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".

-upload -id <Asset ID> -file <File path> [-comment <Comment>]

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.

-download -id <Asset ID> [-revision "Asset version"] -dir <Output destination directory path> }

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.

-e <Character encoding>

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]

[Linux]

Notes

Common notes
Notes on registration
  • 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.

Notes on update
  • 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.

Notes on deletion
  • 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.

Notes on list display
  • If no asset information is registered, only header information is output.

    #asset-id,asset-name,file-name,scope,owner,description
Notes on history display
  • If no file has been uploaded, only header information is output.

    #asset-revision,size,comment,upload-date
Notes on upload
  • 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.

Notes on download
  • When the size of the file to download is large, the process may take some time.

Notes on update errors
  • 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