Skip to content

Commit

Permalink
Restore improvement: transfers swagger (#4063)
Browse files Browse the repository at this point in the history
* fix(makefile): use sctool.dev in make docs

This was overlooked when deleting the sctool file in db466ef.

* fix(docs): backup, generate docs for --skip-schema

This was overlooked when the --skip-schema flag was introduced in 90eb17d.

* feat(swagger): agent, add /rclone/operations/set-transfers endpoint

This endpoint will be used to control the amount of transfers during backup/restore.
  • Loading branch information
Michal-Leszczynski authored Oct 8, 2024
1 parent 9fb5be9 commit 4c14076
Show file tree
Hide file tree
Showing 8 changed files with 420 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ build: build-cli build-agent build-server ## Build all project binaries
docs: export TZ = UTC ## set UTC as the default timezone in generated docs
docs: build ## Update docs/source with generated code
@rm -rf docs/source/sctool/partials
@SCYLLA_MANAGER_CLUSTER="" ./sctool doc -o docs/source/sctool/partials
@SCYLLA_MANAGER_CLUSTER="" ./sctool.dev doc -o docs/source/sctool/partials

.PHONY: filler-tool
filler-tool: ## Build "filler" tool
Expand Down
8 changes: 8 additions & 0 deletions docs/source/sctool/partials/sctool_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ options:
default_value: "false"
usage: |
Prints table names together with keyspace, used in combination with --dry-run.
- name: skip-schema
default_value: "false"
usage: |
Don't backup schema.
For ScyllaDB versions starting at 6.0 and 2024.2, SM requires CQL credentials to back up the schema.
CQL Credentials can be added with 'sctool cluster update --username --password' command.
This flag can be used to skip this step and allow for backing up user data without providing SM with CQL credentials.
Note that it's impossible to restore schema from such backups.
- name: snapshot-parallel
default_value: '[]'
usage: |
Expand Down
8 changes: 8 additions & 0 deletions docs/source/sctool/partials/sctool_backup_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ options:
default_value: "false"
usage: |
Prints table names together with keyspace, used in combination with --dry-run.
- name: skip-schema
default_value: "false"
usage: |
Don't backup schema.
For ScyllaDB versions starting at 6.0 and 2024.2, SM requires CQL credentials to back up the schema.
CQL Credentials can be added with 'sctool cluster update --username --password' command.
This flag can be used to skip this step and allow for backing up user data without providing SM with CQL credentials.
Note that it's impossible to restore schema from such backups.
- name: snapshot-parallel
default_value: '[]'
usage: |
Expand Down
49 changes: 48 additions & 1 deletion v3/swagger/agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"paths": {
"/rclone/core/bwlimit": {
"post": {
"description": "This sets the bandwidth limit to that passed in",
"description": "This sets the bandwidth limit to that passed in. If the rate parameter is not supplied then the bandwidth is queried",
"summary": "Set the bandwidth limit",
"operationId": "CoreBwlimit",
"produces": [
Expand Down Expand Up @@ -54,6 +54,43 @@
"security": []
}
},
"/rclone/core/transfers": {
"post": {
"description": "This sets the default amount of transfers to that passed in. If the transfers parameter is not supplied then the transfers are queried",
"summary": "Set transfers",
"operationId": "CoreTransfers",
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "transfers",
"description": "transfers",
"schema": {
"$ref": "#/definitions/Transfers"
}
}
],
"responses": {
"200": {
"description": "transfers",
"schema": {
"$ref": "#/definitions/Transfers"
},
"headers": {}
},
"default": {
"description": "Server error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
},
"headers": {}
}
},
"security": []
}
},
"/rclone/core/stats-reset": {
"post": {
"description": "Resets stats",
Expand Down Expand Up @@ -875,6 +912,16 @@
}
}
},
"Transfers": {
"title": "transfers",
"type": "object",
"properties": {
"transfers": {
"description": "The number of file transfers to run in parallel",
"type": "integer"
}
}
},
"Jobid": {
"type": "object",
"properties": {
Expand Down
139 changes: 139 additions & 0 deletions v3/swagger/gen/agent/client/operations/core_transfers_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

135 changes: 135 additions & 0 deletions v3/swagger/gen/agent/client/operations/core_transfers_responses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4c14076

Please sign in to comment.