Add support for bucket name in Sia provider #16
This commit is contained in:
parent
8561278539
commit
bc7a74e432
@ -36,12 +36,12 @@ template <typename drive> inline void help(std::vector<const char *> args) {
|
|||||||
std::cout << " -di,--drive_information Display mounted drive "
|
std::cout << " -di,--drive_information Display mounted drive "
|
||||||
"information"
|
"information"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << " -s3,--s3 Enables S3 mode"
|
|
||||||
<< std::endl;
|
|
||||||
std::cout
|
std::cout
|
||||||
<< " -na,--name Unique name for S3 or Sia "
|
<< " -na,--name Unique name for S3 or Sia "
|
||||||
"instance [Required]"
|
"instance [Required]"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
std::cout << " -s3,--s3 Enables S3 mode"
|
||||||
|
<< std::endl;
|
||||||
std::cout
|
std::cout
|
||||||
<< " -gc,--generate_config Generate initial configuration"
|
<< " -gc,--generate_config Generate initial configuration"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
@ -84,10 +84,10 @@ auto main(int argc, char **argv) -> int {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
res = exit_code::invalid_syntax;
|
res = exit_code::invalid_syntax;
|
||||||
} else {
|
} else {
|
||||||
unique_id = parts[0U] + ':' + parts[1U];
|
unique_id = parts.at(0U) + ':' + parts.at(1U);
|
||||||
remote_host = parts[0U];
|
remote_host = parts.at(0U);
|
||||||
try {
|
try {
|
||||||
remote_port = utils::string::to_uint16(parts[1U]);
|
remote_port = utils::string::to_uint16(parts.at(1U));
|
||||||
data_directory = utils::path::combine(
|
data_directory = utils::path::combine(
|
||||||
data_directory.empty() ? app_config::default_data_directory(prov)
|
data_directory.empty() ? app_config::default_data_directory(prov)
|
||||||
: data_directory,
|
: data_directory,
|
||||||
@ -112,7 +112,8 @@ auto main(int argc, char **argv) -> int {
|
|||||||
} else if (res == exit_code::success) {
|
} else if (res == exit_code::success) {
|
||||||
unique_id = utils::string::trim(data);
|
unique_id = utils::string::trim(data);
|
||||||
if (unique_id.empty()) {
|
if (unique_id.empty()) {
|
||||||
std::cerr << "Name of S3 instance not provided" << std::endl;
|
std::cerr << "Name of " << app_config::get_provider_name(prov)
|
||||||
|
<< " instance not provided" << std::endl;
|
||||||
res = exit_code::invalid_syntax;
|
res = exit_code::invalid_syntax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user