This tool can be used to populate a UPS server with mock applications, variants and tokens.
To build from source, you need to have maven installed on your machine.
mvn clean install
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
.
Add your credentials and simply run the script:
mock-data-loader.sh -u <username> -p <password> --apps <apps> --variants <variants> --tokens <tokens>
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>
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