Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

A tool that can be used to populate an UPS server with mock applications, variants and tokens

License

Notifications You must be signed in to change notification settings

aerogear/ups-mock-data-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mocked data loader

This tool can be used to populate a UPS server with mock applications, variants and tokens.

Build the software

To build from source, you need to have maven installed on your machine.

mvn clean install

Load the mock data

Uncompress the produced archive in a directory of your choice:

tar xvfz target/aerogear-mock-data-loader-1.0.0-SNAPSHOT-bin.zip

The executable script will be in aerogear-mock-data-loader-1.0-SNAPSHOT/bin/mock-data-loader.sh.

Creating Mock Data in Standalone UPS

Add your credentials and simply run the script:

mock-data-loader.sh -u <username> -p <password> --apps <apps> --variants <variants> --tokens <tokens>

Creating Mock Data in RHMAP

Only creating tokens is possible. You have to specify the variant credentials in order to do this:

mock-data-loader.sh -u <username> -p <password> --tokens <tokens> <variantId>:<secret>

More Options

Running the script without arguments will show the following help screen:

usage: mock-data-loader.sh -u|--username <username> -p|--password
                           <password> -a|--apps <TOTAL> -t|--tokens <TOTAL>
                           [variantid:secret] -A|--tokenAlias
                           <alias> -v|--variants <TOTAL> [-c|--clientid
                           <CLIENTID> -U|--url <UPS URL>] -C|--csv <path> 
                           -X|--append
 -a,--apps <total>                        Number of apps to be generated
 -A,--alias <alias>                       Use this option if you want a
                                          single alias for all the tokens
 -c,--clientid <id>                       Client id used to create the
                                          apps. Defaults to
                                          <unified-push-server-js>
 -C,--csv <CSV FILE>                      Generates a CSV file containing:
                                          variantid, token alias and
                                          tokenid
 -p,--password <password>                 Password to be used to
                                          authenticate to the UPS
 -t,--tokens <total [variantid:secret]>   Number of tokens to be generated
 -u,--username <username>                 Username to be used to
                                          authenticate to the UPS
 -U,--url <UPS URL>                       URL to the UPS server. Defaults
                                          to <http://localhost:8080>
 -v,--variants <total>                    Number of variants to be
                                          generated
 -X,--append                              Use this option if you want to
                                          append the list of created
                                          tokens to the given CSV file

About

A tool that can be used to populate an UPS server with mock applications, variants and tokens

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages