| .. | .. |
|---|
| 33 | 33 | * file. --server parameter is mandatory. |
|---|
| 34 | 34 | * -s,--server <url_license_server> License server url. |
|---|
| 35 | 35 | * -t,--test_lc Test if License Server (LC) is |
|---|
| 36 | | - * available. --server parameter is |
|---|
| 37 | | - * mandatory. |
|---|
| 38 | 36 | * </pre> |
|---|
| 39 | 37 | * |
|---|
| 40 | 38 | * @author roberto <roberto.sanchez@curisit.net> |
|---|
| .. | .. |
|---|
| 85 | 83 | } |
|---|
| 86 | 84 | |
|---|
| 87 | 85 | if (cmd.hasOption('c')) { |
|---|
| 88 | | - String reqFilename = cmd.getOptionValue("rfile"); |
|---|
| 89 | | - checkMandatoryParameter(reqFilename, "rfile"); |
|---|
| 90 | | - |
|---|
| 91 | | - LOG.warn("This command is not yet implemented"); |
|---|
| 92 | | - System.exit(0); |
|---|
| 86 | + LicenseManager.getInstance().requestLicense(); |
|---|
| 87 | + System.exit(0); |
|---|
| 93 | 88 | } |
|---|
| 94 | 89 | |
|---|
| 95 | 90 | if (cmd.hasOption('t')) { |
|---|
| 96 | | - LOG.warn("This command is not yet implemented"); |
|---|
| 97 | | - System.exit(0); |
|---|
| 91 | + LicenseManager.getInstance().testServer(); |
|---|
| 92 | + System.exit(0); |
|---|
| 98 | 93 | } |
|---|
| 99 | 94 | |
|---|
| 100 | 95 | if (cmd.hasOption('r')) { |
|---|
| .. | .. |
|---|
| 168 | 163 | options.addOption(OptionBuilder.withArgName("lic_file").withLongOpt("validate").withDescription("Validate lic file.").hasArg(true).create('l')); |
|---|
| 169 | 164 | |
|---|
| 170 | 165 | options.addOption("g", "gen_request", false, "Generate request file. If --rfile parameter is missing then It is generated in current directory."); |
|---|
| 171 | | - options.addOption(OptionBuilder.withArgName("lic_file").withLongOpt("create").withDescription("Request a license file from server.").hasArg(true).create('c')); |
|---|
| 172 | | - options.addOption("t", "test_lc", false, "Test if License Server (LC) is available. --server parameter is mandatory."); |
|---|
| 166 | + options.addOption(OptionBuilder.withLongOpt("create").withDescription("Request a license file to server.").hasArg(false).create('c')); |
|---|
| 167 | + options.addOption("t", "test_lc", false, "Test if License Server (LC) is available. "); |
|---|
| 173 | 168 | options.addOption(OptionBuilder.withArgName("lic_file").withLongOpt("renew").withDescription("Synchronize/renew the current license file.").hasArg(true).create('r')); |
|---|
| 174 | 169 | |
|---|
| 175 | 170 | return options; |
|---|