rsanchez
2014-09-29 4be65eae04c0ed497bf404d43f9a11a4993a239d
src/main/java/net/curisit/securis/License.java
....@@ -33,8 +33,6 @@
3333 * file. --server parameter is mandatory.
3434 * -s,--server <url_license_server> License server url.
3535 * -t,--test_lc Test if License Server (LC) is
36
- * available. --server parameter is
37
- * mandatory.
3836 * </pre>
3937 *
4038 * @author roberto <roberto.sanchez@curisit.net>
....@@ -85,16 +83,13 @@
8583 }
8684
8785 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);
9388 }
9489
9590 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);
9893 }
9994
10095 if (cmd.hasOption('r')) {
....@@ -168,8 +163,8 @@
168163 options.addOption(OptionBuilder.withArgName("lic_file").withLongOpt("validate").withDescription("Validate lic file.").hasArg(true).create('l'));
169164
170165 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. ");
173168 options.addOption(OptionBuilder.withArgName("lic_file").withLongOpt("renew").withDescription("Synchronize/renew the current license file.").hasArg(true).create('r'));
174169
175170 return options;