Top
Systemwalker Software Configuration Manager Developer's Guide
FUJITSU Software

3.3.2 swcfmg_param_collectingdef (Parameter Collection Definition Management Command)

Description

Adds, updates, deletes, lists, and acquires parameter collection definitions. Also, uploads or downloads the script package associated with the script package of a parameter collection definition.

Uses a parameter collection definition input file as the input file for adding, updating, and acquiring. The parameter collection definition input file is in XML format. Refer to "2.2 Definition of Parameters to be Collected" for details.

Uses a script package for uploading and downloading. The script package is a zip file. Refer to "2.2.3 Package Files" for details.

Synopsis

[Windows]

swcfmg_param_collectingdef.exe

{ -add -file <Parameter collection definition file path> |

-update -id <Parameter collection definition ID> -file <Parameter collection definition file path>|

-delete -id <Parameter collection definition ID>,... |

-list [-file <Output file path>] [-e <Character encoding>] |

-get -id <Parameter collection definition ID> -file <Output file path> |

-upload -id <Parameter collection definition ID> -file <Script package file path> |

-download -id <Parameter collection definition ID> -dir <Output directory path> }

[Linux]

swcfmg_param_collectingdef

{ -add -file <Parameter collection definition file path> |

-update -id <Parameter collection definition ID> -file <Parameter collection definition file path>|

-delete -id <Parameter collection definition ID>,... |

-list [-file <Output file path>] [-e <Character encoding>] |

-get -id <Parameter collection definition ID> -file <Output file path> |

-upload -id <Parameter collection definition ID> -file <Script package file path> |

-download -id <Parameter collection definition ID> -dir <Output directory path> }

Options

-add -file <Parameter collection definition file path>

Adds the parameter collection definition using the specified parameter collection definition file. The input file is a parameter collection definition XML file.

A parameter collection definition ID is generated for the newly added parameter collection definition. Outputs this ID to standard output.

  • Format of ID to be generated

    The parameter collection definition ID is automatically assigned a number according to the following rule:

    SC (prefix) + 8-digit number
    Example:
    SC00000001
  • Output format for standard output

    The parameter collection definition ID is output in the following format:

    [<Parameter collection definition ID>]
-update -id <Parameter collection definition ID> -file <Parameter collection definition file path>

Updates the parameter collection definition for the parameter collection definition ID using the specified parameter collection definition file. The input file is a parameter collection definition XML file.

-delete -id <Parameter collection definition ID>,

Deletes the parameter collection definition from the parameter collection definition ID. Also, deletes the association (if any) between the software and the parameter collection definition. Multiple parameter collection definition IDs can be specified by delimiting them with "," (comma).

-list [-file <Output file path>]

Uses a parameter collection definition list file in CSV format to output a list of registered parameter collection definitions.

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 output to the file fails due to an error, no new file will be created. If an existing file was to be overwritten, it will be kept as is without being overwritten.

  • Output format for standard output

    Outputs the list of parameter collection definitions in the following format:

    Item No.

    Item

    Remarks

    1

    Parameter collection definition ID

    Outputs the parameter collection definition ID.

    2

    Is the parameter collection definition product-predefined?

    Outputs whether the parameter collection definition is product-predefined.

    3

    Parameter collection definition name

    Outputs the parameter collection definition name.

    4

    Parameter collection method

    Outputs the parameter collection method.

    5

    Script package file name

    Outputs the name of the script 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.

    #Definition ID,Product predefined,Definition name,Method,Package name

-get -id <Parameter collection definition ID> -file <Output file path>

Outputs the parameter collection definition for the parameter collection definition ID to the specified output file path. The output file is a parameter collection definition XML 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 output to the file fails due to an error, no new file will be created. If an existing file was to be overwritten, it will be kept as is without being overwritten.

-upload -id <Parameter collection definition ID> -file <Script package file path>

Uploads the script package to the parameter collection definition for the parameter collection definition ID. The input file is a script package zip file.

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

  • Store the discovery script in the root.

    Store the discovery script (discover.cmd or discover.sh) in the root of the zip file rather than under the directory.

-download -id <Parameter collection definition ID> -dir <Output directory path>

Downloads the script package registered in the parameter collection definition of the parameter collection definition ID. Outputs script package zip files to the output directory path.

Ensure that no files exist in the output directory, or an error will occur.

-e <Character encoding>

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.

71

The specified ID is product-predefined.

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

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]

[Linux]

Notes

Common notes
  • This command cannot be executed simultaneously with 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.

Notes regarding update
  • The method cannot be changed if the software and a parameter collection definition are associated or a script package is registered.

  • If multiple parameter collection definitions are associated with a single software product, you cannot specify a duplicate key for the parameter list.

Notes regarding deletion
  • Use this command to delete information about parameter collection definitions that no longer need to be managed by Systemwalker Software Configuration Manager.

Notes regarding list display
  • If no parameter collection definitions have been registered, only the header information will be output.

    #Definition ID,Product predefined,Definition name,Method,Package name

Notes regarding additions and update errors
  • If a parameter collection definition file is invalid, the registration and update of the parameter collection definitions will be canceled and the following error message will be output:

    An error occurred during XML file validation.[Details:<Cause>]

Examples