Main Content

polyspace-access -generate-migration-commands

Generate scripts to migrate projects from Polyspace Metrics to Polyspace Access

    Description

    The system command polyspace-access -generate-migration-commands generates scripts to migrate projects from Polyspace® Metrics to Polyspace Access™.

    polyspace-access -generate-migration-commands <metrics_folder> -output-folder-path <output_folder> [generate migration commands options] [output options] generates scripts to migrate projects from the path <metrics_folder> in Polyspace Metrics to Polyspace Access. The command stores the scripts in <output_folder>. To specify which project findings to migrate, use generate migration commands options.

    example

    Examples

    collapse all

    Migrate projects stored on a Polyspace Metrics server to the Polyspace Access database. Log in to your Metrics server to complete this operation.

    Generate migration scripts for all projects in the metrics folder C:\Users\jsmith\AppData\Roaming\Polyspace_RLDatas\results-repository that were uploaded on or after June 2017. Store the scripts in the folder C:\Polyspace_Workspace\toMigrate.

    polyspace-access -generate-migration-commands ^
    C:\Users\jsmith\AppData\Roaming\Polyspace_RLDatas\results-repository ^
    -output-folder-path C:\Polyspace_Workspace\toMigrate -project-date-after 2017-06

    Use the -dryrun option to check which projects will be migrated.

    polyspace-access -migrate -option-file-path ^
    C:\Polyspace_Workspace\toMigrate -dryrun ^
    -host myAccessServer
    The command output contains a list of projects. Inspect it to ensure that you are migrating the correct projects.

    To perform the migration, rerun the last command without the -dryrun option.

    Input Arguments

    collapse all

    Migrate Results from Metrics to Polyspace Access

    Path of folder containing the Polyspace Metrics projects you want to migrate to Polyspace Access, specified as a string.

    Example: C:\Users\%username%\AppData\Roaming\Polyspace_RLDatas\results-repository

    Path to folder that migration scripts, specified as a string. You are unable to specify an existing folder.

    Example: -output-folder-path local/Polyspace_Workspace/migration_scripts

    OptionDescription

    -max-project-runs <int>

    Number of most recent analysis runs you want to migrate for each project. For instance, to migrate only the last two analysis runs of a project, specify 2.

    -project-date-after <date>

    Only migrate results that were uploaded to Polyspace Metrics on or after the specified date. Specify <date> in the format YYYY, YYYY-MM, or YYYY-MM-DD

    -product <productName>

    Product used to analyze and produce project findings, specified as bug-finder, code-prover, or polyspace-ada.

    -analysis-mode integration | unit-by-unit

    Analysis mode use to generate project findings, specified as integration or unit-by-unit.

    Connection Configuration

    Polyspace Access machine hostname that you specify in the URL of the Polyspace Access interface, such as https://hostname:portNumber/metrics/index.html. If you are unsure about which hostname to use, contact your Polyspace Access administrator.

    You must specify a hostname with all polyspace-access commands, except the -generate-migration-commands and -encrypt-password commands.

    Example: -host myAccessServer

    Port number that you specify in the URL of the Polyspace Access interface, such as https://hostname:portNumber/metrics/index.html. If you are unsure about which port number to use, contact your Polyspace Access administrator.

    HTTP protocol used to access Polyspace Access, specified as http or https.

    Full path to the text file where you store your login credentials. Use this option if you use a command that requires your Polyspace Access credentials in a script but you do not want to store your credentials in that script. While the script runs, someone inspecting currently running processes cannot see your credentials.

    You can store only one set of credentials in the file, either as -login and -encrypted-password entries on separate lines, for instance:

    -login jsmith
    -encrypted-password LAMMMEACDMKEFELKMNDCONEAPECEEKPL
    You can also store credentials as an -api-key entry:
    -api-key keyValue123
    Make sure that the file where you store your credentials is UTF-8 encoded and that you restrict the read and write permissions on the file. For example, to restrict read and write permissions on file login.txt in Linux®, use this command:
    chmod go-rwx login.txt

    API key you use as a login credential instead of providing your login and encrypted password. To assign an API key to a user, see Configure User Manager or contact your Polyspace Access administrator.

    Use the API key if you use a command that requires your Polyspace Access login credentials as part of an automation script with a CI tool such as Jenkins®. If a user updates their password, you do not need to update the API key associated with that user in your scripts.

    It is recommended that you store the API key in a text file and pass that file to the command by using the -credentials-file option.

    Login username that you use to interact with Polyspace Access.

    Use the options -login and -encryped-password together. If you do not use these two options together, you are prompted to enter your credentials at the command line, unless you use -api-key.

    Login password you use to interact with Polyspace Access. <ENCRYPTED_PASSWORD> is the output of the polyspace-access -encrypt-password command.

    Use the options -login and -encryped-password together. If you do not use these two options together, you are prompted to enter your credentials at the command line, unless you use the -api-key option.

    Number of times the polyspace-access command retries to upload results when you upload from a client machine to the server machine that hosts Polyspace Access before failing. Specify this option to retry the upload command in the event of sporadic network outages. The command waits 10 seconds between retries.

    Full path to command outputs.

    Path to the folder for storing temporary files generated by polyspace-access commands. The default folder path depends on your platform:

    • Windows — C:\Users\%username%\AppData\Local\Temp\ps_results_server

    • Linux — tmp/ps_results_server

    File path where you store the command output log. By default the command does not generate a log file.

    Version History

    Introduced in R2019a