summaryrefslogtreecommitdiff
path: root/src/mongo/tools/mongobridge_options.cpp
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@10gen.com>2013-10-21 13:00:20 -0400
committerShaun Verch <shaun.verch@10gen.com>2013-10-23 19:41:30 -0400
commit1c6ad3e411e431cf81da9f7d514fa20ec4fe792a (patch)
tree8f69f9a92565febf53d251c9399fdba1fe3f2e56 /src/mongo/tools/mongobridge_options.cpp
parent22f5a8622731353890352dbaccdebdc937ae8508 (diff)
downloadmongo-1c6ad3e411e431cf81da9f7d514fa20ec4fe792a.tar.gz
SERVER-11144 Use new chaining interface in options
Diffstat (limited to 'src/mongo/tools/mongobridge_options.cpp')
-rw-r--r--src/mongo/tools/mongobridge_options.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/mongo/tools/mongobridge_options.cpp b/src/mongo/tools/mongobridge_options.cpp
index 862d8b6a1b3..dec9e65117c 100644
--- a/src/mongo/tools/mongobridge_options.cpp
+++ b/src/mongo/tools/mongobridge_options.cpp
@@ -28,27 +28,19 @@ namespace mongo {
Status addMongoBridgeOptions(moe::OptionSection* options) {
- Status ret = options->addOption(OD("help", "help", moe::Switch,
- "produce help message", true));
- if(!ret.isOK()) {
- return ret;
- }
+ options->addOptionChaining("help", "help", moe::Switch, "produce help message");
- ret = options->addOption(OD("port", "port", moe::Int, "port to listen for mongo messages"));
- if(!ret.isOK()) {
- return ret;
- }
- ret = options->addOption(OD("dest", "dest", moe::String, "uri of remote mongod instance"));
- if(!ret.isOK()) {
- return ret;
- }
+ options->addOptionChaining("port", "port", moe::Int, "port to listen for mongo messages");
+
+
+ options->addOptionChaining("dest", "dest", moe::String, "uri of remote mongod instance");
+
+
+ options->addOptionChaining("delay", "delay", moe::Int,
+ "transfer delay in milliseconds (default = 0)")
+ .setDefault(moe::Value(0));
- ret = options->addOption(OD("delay", "delay", moe::Int,
- "transfer delay in milliseconds (default = 0)", true, moe::Value(0)));
- if(!ret.isOK()) {
- return ret;
- }
return Status::OK();
}