Giter Club home page Giter Club logo

ups-mock-data-loader's Introduction

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

ups-mock-data-loader's People

Contributors

dimitraz avatar josemigallas avatar matzew avatar secondsun avatar ziccardi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ups-mock-data-loader's Issues

Tool fails when URL parameter is in full version

When adding tokens to a variant in a variant in Red Hat Mobile Application Platform, I use the same url that the Push section gives me, in this case https://myapp.feedhenry.com/api/v2/ag-push/, but the loader always fails. This has happened to me several times until I realise that removing "ag-push" fixes the problem.

This tool is to be used with the RHMAP so it should be able to receive the url as indicated there, because it's very confusing. IMO These urls should be all valid:

https://myapp.feedhenry.com/api/v2/ag-push/
https://myapp.feedhenry.com/api/v2/ag-push
https://myapp.feedhenry.com/api/v2/
https://myapp.feedhenry.com/api/v2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.