Skip to content

Commit

Permalink
Remove outdated ydbd serverconfig option (ydb-platform#1422)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enjection authored Jan 30, 2024
1 parent 093c9af commit 42c0a05
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1510,32 +1510,6 @@ class TClientCommandServerBase : public TClientCommand {
}
};

class TClientCommandServerConfig : public TClientCommandServerBase {
public:
TClientCommandServerConfig()
: TClientCommandServerBase("serverconfig", "Generate configs for new-style invocation of server")
{
}

virtual void Config(TConfig& config) override {
TClientCommandServerBase::Config(config);
config.Opts->AddLongOption("dump-config-to", "Dump final application config protobuf to PATH and terminate").RequiredArgument("PATH").Required();
}

virtual int Run(TConfig& config) override {
Y_ABORT_UNLESS(config.ParseResult->Has("dump-config-to"));

TString proto;
const bool status = google::protobuf::TextFormat::PrintToString(AppConfig, &proto);
Y_ABORT_UNLESS(status);
TString path = config.ParseResult->Get("dump-config-to");
TFileOutput file(path);
file << proto;

return 0;
}
};

class TClientCommandServer : public TClientCommandServerBase {
public:
TClientCommandServer(std::shared_ptr<TModuleFactories> factories)
Expand All @@ -1554,7 +1528,6 @@ class TClientCommandServer : public TClientCommandServerBase {

void AddClientCommandServer(TClientCommandTree& parent, std::shared_ptr<TModuleFactories> factories) {
parent.AddCommand(std::make_unique<TClientCommandServer>(factories));
parent.AddCommand(std::make_unique<TClientCommandServerConfig>());
}

}
Expand Down

0 comments on commit 42c0a05

Please sign in to comment.