Skip to content

Commit

Permalink
Merge 26d66c7 into 4fe6505
Browse files Browse the repository at this point in the history
  • Loading branch information
pixcc authored Oct 11, 2024
2 parents 4fe6505 + 26d66c7 commit a12973e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions ydb/public/lib/ydb_cli/commands/ydb_service_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,12 @@ void TCommandExportToS3::Config(TConfig& config) {
config.Opts->AddLongOption("s3-endpoint", "S3 endpoint to connect to")
.Required().RequiredArgument("ENDPOINT").StoreResult(&AwsEndpoint);

config.Opts->AddLongOption("scheme", "S3 endpoint scheme")
auto colors = NColorizer::AutoColors(Cout);
config.Opts->AddLongOption("scheme", TStringBuilder()
<< "S3 endpoint scheme - "
<< colors.BoldColor() << "http" << colors.OldColor()
<< " or "
<< colors.BoldColor() << "https" << colors.OldColor())
.RequiredArgument("SCHEME").StoreResult(&AwsScheme).DefaultValue(AwsScheme);

TStringBuilder storageClassHelp;
Expand Down Expand Up @@ -277,7 +282,12 @@ void TCommandExportToS3::Config(TConfig& config) {
<< " - zstd-N (N is compression level, e.g. zstd-3)" << Endl)
.RequiredArgument("STRING").StoreResult(&Compression);

config.Opts->AddLongOption("use-virtual-addressing", "S3 bucket virtual addressing")
config.Opts->AddLongOption("use-virtual-addressing", TStringBuilder()
<< "Sets bucket URL style. Value "
<< colors.BoldColor() << "true" << colors.OldColor()
<< " means use Virtual-Hosted-Style URL, "
<< colors.BoldColor() << "false" << colors.OldColor()
<< " - Path-Style URL.")
.RequiredArgument("BOOL").StoreResult<bool>(&UseVirtualAddressing).DefaultValue("true");

AddDeprecatedJsonOption(config);
Expand Down
14 changes: 12 additions & 2 deletions ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ void TCommandImportFromS3::Config(TConfig& config) {
config.Opts->AddLongOption("s3-endpoint", "S3 endpoint to connect to")
.Required().RequiredArgument("ENDPOINT").StoreResult(&AwsEndpoint);

config.Opts->AddLongOption("scheme", "S3 endpoint scheme")
auto colors = NColorizer::AutoColors(Cout);
config.Opts->AddLongOption("scheme", TStringBuilder()
<< "S3 endpoint scheme - "
<< colors.BoldColor() << "http" << colors.OldColor()
<< " or "
<< colors.BoldColor() << "https" << colors.OldColor())
.RequiredArgument("SCHEME").StoreResult(&AwsScheme).DefaultValue(AwsScheme);

config.Opts->AddLongOption("bucket", "S3 bucket")
Expand Down Expand Up @@ -92,7 +97,12 @@ void TCommandImportFromS3::Config(TConfig& config) {
config.Opts->AddLongOption("retries", "Number of retries")
.RequiredArgument("NUM").StoreResult(&NumberOfRetries).DefaultValue(NumberOfRetries);

config.Opts->AddLongOption("use-virtual-addressing", "S3 bucket virtual addressing")
config.Opts->AddLongOption("use-virtual-addressing", TStringBuilder()
<< "Sets bucket URL style. Value "
<< colors.BoldColor() << "true" << colors.OldColor()
<< " means use Virtual-Hosted-Style URL, "
<< colors.BoldColor() << "false" << colors.OldColor()
<< " - Path-Style URL.")
.RequiredArgument("BOOL").StoreResult<bool>(&UseVirtualAddressing).DefaultValue("true");

config.Opts->AddLongOption("no-acl", "Prevent importing of ACL and owner")
Expand Down

0 comments on commit a12973e

Please sign in to comment.