From 91c6ffdaddf1e72dce32d8ae3a62a8fa0e81468f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczy=C5=84ski?= <2000michal@wp.pl> Date: Tue, 5 Dec 2023 16:21:07 +0100 Subject: [PATCH] feat(swagger): scylla_v1, added new repair endpoint params --- ...epair_async_by_keyspace_post_parameters.go | 96 +++++++++++++++++++ swagger/scylla_v1.json | 21 ++++ 2 files changed, 117 insertions(+) diff --git a/swagger/gen/scylla/v1/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go b/swagger/gen/scylla/v1/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go index 2b25936cea..6f2cd14a16 100644 --- a/swagger/gen/scylla/v1/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go +++ b/swagger/gen/scylla/v1/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go @@ -81,6 +81,11 @@ type StorageServiceRepairAsyncByKeyspacePostParams struct { */ Hosts *string + /*IgnoreNodes + Which hosts are to ignore in this repair. Multiple hosts can be listed separated by commas. + + */ + IgnoreNodes *string /*Incremental If the value is the string 'true' with any capitalization, perform incremental repair. @@ -111,6 +116,16 @@ type StorageServiceRepairAsyncByKeyspacePostParams struct { */ Ranges *string + /*RangesParallelism + An integer specifying the number of ranges to repair in parallel by user request. If this number is bigger than the max_repair_ranges_in_parallel calculated by Scylla core, the smaller one will be used. + + */ + RangesParallelism *string + /*SmallTableOptimization + If the value is the string 'true' with any capitalization, perform small table optimization. When this option is enabled, user can send the repair request to any of the nodes in the cluster. There is no need to send repair requests to multiple nodes. All token ranges for the table will be repaired automatically. + + */ + SmallTableOptimization *string /*StartToken Token on which to begin repair @@ -204,6 +219,17 @@ func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetHosts(hosts *string) o.Hosts = hosts } +// WithIgnoreNodes adds the ignoreNodes to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithIgnoreNodes(ignoreNodes *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetIgnoreNodes(ignoreNodes) + return o +} + +// SetIgnoreNodes adds the ignoreNodes to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetIgnoreNodes(ignoreNodes *string) { + o.IgnoreNodes = ignoreNodes +} + // WithIncremental adds the incremental to the storage service repair async by keyspace post params func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithIncremental(incremental *string) *StorageServiceRepairAsyncByKeyspacePostParams { o.SetIncremental(incremental) @@ -270,6 +296,28 @@ func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetRanges(ranges *string o.Ranges = ranges } +// WithRangesParallelism adds the rangesParallelism to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithRangesParallelism(rangesParallelism *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetRangesParallelism(rangesParallelism) + return o +} + +// SetRangesParallelism adds the rangesParallelism to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetRangesParallelism(rangesParallelism *string) { + o.RangesParallelism = rangesParallelism +} + +// WithSmallTableOptimization adds the smallTableOptimization to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithSmallTableOptimization(smallTableOptimization *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetSmallTableOptimization(smallTableOptimization) + return o +} + +// SetSmallTableOptimization adds the smallTableOptimization to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetSmallTableOptimization(smallTableOptimization *string) { + o.SmallTableOptimization = smallTableOptimization +} + // WithStartToken adds the startToken to the storage service repair async by keyspace post params func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithStartToken(startToken *string) *StorageServiceRepairAsyncByKeyspacePostParams { o.SetStartToken(startToken) @@ -364,6 +412,22 @@ func (o *StorageServiceRepairAsyncByKeyspacePostParams) WriteToRequest(r runtime } + if o.IgnoreNodes != nil { + + // query param ignore_nodes + var qrIgnoreNodes string + if o.IgnoreNodes != nil { + qrIgnoreNodes = *o.IgnoreNodes + } + qIgnoreNodes := qrIgnoreNodes + if qIgnoreNodes != "" { + if err := r.SetQueryParam("ignore_nodes", qIgnoreNodes); err != nil { + return err + } + } + + } + if o.Incremental != nil { // query param incremental @@ -449,6 +513,38 @@ func (o *StorageServiceRepairAsyncByKeyspacePostParams) WriteToRequest(r runtime } + if o.RangesParallelism != nil { + + // query param ranges_parallelism + var qrRangesParallelism string + if o.RangesParallelism != nil { + qrRangesParallelism = *o.RangesParallelism + } + qRangesParallelism := qrRangesParallelism + if qRangesParallelism != "" { + if err := r.SetQueryParam("ranges_parallelism", qRangesParallelism); err != nil { + return err + } + } + + } + + if o.SmallTableOptimization != nil { + + // query param small_table_optimization + var qrSmallTableOptimization string + if o.SmallTableOptimization != nil { + qrSmallTableOptimization = *o.SmallTableOptimization + } + qSmallTableOptimization := qrSmallTableOptimization + if qSmallTableOptimization != "" { + if err := r.SetQueryParam("small_table_optimization", qSmallTableOptimization); err != nil { + return err + } + } + + } + if o.StartToken != nil { // query param startToken diff --git a/swagger/scylla_v1.json b/swagger/scylla_v1.json index 4458e2c92c..574e8c2333 100644 --- a/swagger/scylla_v1.json +++ b/swagger/scylla_v1.json @@ -10389,12 +10389,33 @@ "type": "string", "description": "Which hosts are to participate in this repair. Multiple hosts can be listed separated by commas." }, + { + "name": "ignore_nodes", + "in": "query", + "required": false, + "type": "string", + "description": "Which hosts are to ignore in this repair. Multiple hosts can be listed separated by commas." + }, { "name": "trace", "in": "query", "required": false, "type": "string", "description": "If the value is the string 'true' with any capitalization, enable tracing of the repair." + }, + { + "name": "ranges_parallelism", + "in": "query", + "required": false, + "type": "string", + "description": "An integer specifying the number of ranges to repair in parallel by user request. If this number is bigger than the max_repair_ranges_in_parallel calculated by Scylla core, the smaller one will be used." + }, + { + "name": "small_table_optimization", + "in": "query", + "required": false, + "type": "string", + "description": "If the value is the string 'true' with any capitalization, perform small table optimization. When this option is enabled, user can send the repair request to any of the nodes in the cluster. There is no need to send repair requests to multiple nodes. All token ranges for the table will be repaired automatically." } ], "responses": {