File tree Expand file tree Collapse file tree 4 files changed +30
-4
lines changed
include/ydb-cpp-sdk/client/bsconfig Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ class TStorageConfigClient {
4444 // Fetch current cluster storage config
4545 TAsyncFetchStorageConfigResult FetchStorageConfig (const TStorageConfigSettings& settings = {});
4646
47+ // Bootstrap cluster with automatic configuration
48+ TAsyncStatus BootstrapCluster (const std::string& selfAssemblyUUID);
49+
4750private:
4851 class TImpl ;
4952
Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ import "src/api/protos/ydb_bsconfig.proto";
1010
1111service BSConfigService {
1212
13- // Initialize Blobstorage host configs and box
13+ // Initialize Blobstorage/single config
1414 rpc ReplaceStorageConfig (BSConfig .ReplaceStorageConfigRequest ) returns (BSConfig .ReplaceStorageConfigResponse );
1515
16- // Fetch Blobstorage host configs and box
16+ // Fetch Blobstorage/single config
1717 rpc FetchStorageConfig (BSConfig .FetchStorageConfigRequest ) returns (BSConfig .FetchStorageConfigResponse );
1818
19- }
19+ // Bootstrap automatically configured cluster
20+ rpc BootstrapCluster (BSConfig .BootstrapClusterRequest ) returns (BSConfig .BootstrapClusterResponse );
21+
22+ }
Original file line number Diff line number Diff line change @@ -35,4 +35,13 @@ message FetchStorageConfigResponse {
3535
3636message FetchStorageConfigResult {
3737 string yaml_config = 1 ;
38- }
38+ }
39+
40+ message BootstrapClusterRequest {
41+ Ydb.Operations.OperationParams operation_params = 1 ;
42+ string self_assembly_uuid = 2 ;
43+ }
44+
45+ message BootstrapClusterResponse {
46+ Ydb.Operations.Operation operation = 1 ;
47+ }
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ class TStorageConfigClient::TImpl : public TClientImplCommon<TStorageConfigClien
4747 return promise.GetFuture ();
4848 }
4949
50+ TAsyncStatus BootstrapCluster (const std::string& selfAssemblyUUID) {
51+ auto request = MakeRequest<Ydb::BSConfig::BootstrapClusterRequest>();
52+ request.set_self_assembly_uuid (selfAssemblyUUID);
53+ return RunSimple<Ydb::BSConfig::V1::BSConfigService, Ydb::BSConfig::BootstrapClusterRequest,
54+ Ydb::BSConfig::BootstrapClusterResponse>(std::move (request),
55+ &Ydb::BSConfig::V1::BSConfigService::Stub::AsyncBootstrapCluster);
56+ }
5057};
5158
5259TStorageConfigClient::TStorageConfigClient (const TDriver& driver, const TCommonClientSettings& settings)
@@ -63,5 +70,9 @@ TAsyncFetchStorageConfigResult TStorageConfigClient::FetchStorageConfig(const TS
6370 return Impl_->FetchStorageConfig (settings);
6471}
6572
73+ TAsyncStatus TStorageConfigClient::BootstrapCluster (const std::string& selfAssemblyUUID) {
74+ return Impl_->BootstrapCluster (selfAssemblyUUID);
75+ }
76+
6677
6778}
You can’t perform that action at this time.
0 commit comments