poke+pingserver: remove deprecated command-line options
Change-Id: Ic5518f1ca54edcb4a4c4fbe16f96b207dc867ebf
diff --git a/tools/peek/ndnpoke/main.cpp b/tools/peek/ndnpoke/main.cpp
index 482cf80..669ba2a 100644
--- a/tools/peek/ndnpoke/main.cpp
+++ b/tools/peek/ndnpoke/main.cpp
@@ -53,7 +53,6 @@
std::string progName(argv[0]);
PokeOptions options;
std::string signingStr;
- bool wantDigestSha256 = false;
po::options_description genericOptDesc("Generic options");
genericOptDesc.add_options()
@@ -81,15 +80,8 @@
hiddenOptDesc.add_options()
("name", po::value<std::string>(), "Data name");
- po::options_description deprecatedOptDesc;
- deprecatedOptDesc.add_options()
- ("force,f", po::bool_switch())
- ("identity,i", po::value<std::string>())
- ("digest,D", po::bool_switch(&wantDigestSha256))
- ;
-
po::options_description optDesc;
- optDesc.add(visibleOptDesc).add(hiddenOptDesc).add(deprecatedOptDesc);
+ optDesc.add(visibleOptDesc).add(hiddenOptDesc);
po::positional_options_description optPos;
optPos.add("name", -1);
@@ -104,16 +96,6 @@
return 2;
}
- if (vm["force"].as<bool>()) {
- std::cerr << "WARNING: option '-f/--force' is deprecated and will be removed "
- "in the near future. Use '-u/--unsolicited' instead." << std::endl;
- options.wantUnsolicited = true;
- }
- if (wantDigestSha256 || vm.count("identity") > 0) {
- std::cerr << "WARNING: options '-i/--identity' and '-D/--digest' are deprecated and will be "
- "removed in the near future. Use '-S/--signing-info' instead." << std::endl;
- }
-
if (vm.count("help") > 0) {
usage(std::cout, progName, visibleOptDesc);
return 0;
@@ -149,24 +131,6 @@
return 2;
}
- if (vm.count("identity") > 0) {
- if (wantDigestSha256) {
- std::cerr << "ERROR: conflicting '--digest' and '--identity' options specified" << std::endl;
- return 2;
- }
- try {
- options.signingInfo.setSigningIdentity(vm["identity"].as<std::string>());
- }
- catch (const Name::Error& e) {
- std::cerr << "ERROR: invalid identity name: " << e.what() << std::endl;
- return 2;
- }
- }
-
- if (wantDigestSha256) {
- options.signingInfo.setSha256Signing();
- }
-
try {
options.signingInfo = security::SigningInfo(signingStr);
}
diff --git a/tools/ping/server/main.cpp b/tools/ping/server/main.cpp
index d43f1d2..e81125c 100644
--- a/tools/ping/server/main.cpp
+++ b/tools/ping/server/main.cpp
@@ -127,13 +127,8 @@
hiddenDesc.add_options()
("prefix", po::value<std::string>(&prefix));
- po::options_description deprecatedDesc;
- deprecatedDesc.add_options()
- ("_deprecated_freshness_,x", po::value<time::milliseconds::rep>())
- ;
-
po::options_description optDesc;
- optDesc.add(visibleDesc).add(hiddenDesc).add(deprecatedDesc);
+ optDesc.add(visibleDesc).add(hiddenDesc);
po::positional_options_description posDesc;
posDesc.add("prefix", -1);
@@ -154,11 +149,6 @@
return 2;
}
- if (vm.count("_deprecated_freshness_") > 0) {
- std::cerr << "WARNING: short option '-x' is deprecated and will be removed in the near "
- "future. Please use '-f' or the long form '--freshness'." << std::endl;
- }
-
if (vm.count("help") > 0) {
usage(std::cout, argv[0], visibleDesc);
return 0;
@@ -177,9 +167,6 @@
options.prefix = prefix;
options.freshnessPeriod = time::milliseconds(vm["freshness"].as<time::milliseconds::rep>());
- if (vm.count("_deprecated_freshness_") > 0) {
- options.freshnessPeriod = time::milliseconds(vm["_deprecated_freshness_"].as<time::milliseconds::rep>());
- }
if (options.freshnessPeriod < 0_ms) {
std::cerr << "ERROR: FreshnessPeriod cannot be negative" << std::endl;
return 2;