Skip to content

Commit

Permalink
Add ignore_dbs to online migration docs (#841)
Browse files Browse the repository at this point in the history
* Add ignore_dbs to online migration docs

* Make ignore_dbs array of string type

---------

Co-authored-by: Rahul Bhardwaj <[email protected]>
  • Loading branch information
bhardwajRahul and Rahul Bhardwaj authored Nov 9, 2023
1 parent 7a717b3 commit 423c2d3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ tags:
- Databases

parameters:
- $ref: 'parameters.yml#/database_cluster_uuid'
- $ref: "parameters.yml#/database_cluster_uuid"

requestBody:
required: true

content:
application/json:
schema:
$ref: 'models/source_database.yml'
$ref: "models/source_database.yml"

example:
source:
Expand All @@ -31,30 +31,31 @@ requestBody:
username: doadmin
password: paakjnfe10rsrsmf
disable_ssl: false
ignore_dbs: ["db0","db1"]

responses:
'200':
$ref: 'responses/online_migration.yml'
"200":
$ref: "responses/online_migration.yml"

'401':
$ref: '../../shared/responses/unauthorized.yml'
"401":
$ref: "../../shared/responses/unauthorized.yml"

'404':
$ref: '../../shared/responses/not_found.yml'
"404":
$ref: "../../shared/responses/not_found.yml"

'429':
$ref: '../../shared/responses/too_many_requests.yml'
"429":
$ref: "../../shared/responses/too_many_requests.yml"

'500':
$ref: '../../shared/responses/server_error.yml'
"500":
$ref: "../../shared/responses/server_error.yml"

default:
$ref: '../../shared/responses/unexpected_error.yml'
$ref: "../../shared/responses/unexpected_error.yml"

x-codeSamples:
- $ref: 'examples/curl/databases_update_onlineMigration.yml'
- $ref: 'examples/python/databases_update_onlineMigration.yml'
- $ref: "examples/curl/databases_update_onlineMigration.yml"
- $ref: "examples/python/databases_update_onlineMigration.yml"

security:
- bearer_auth:
- 'write'
- "write"
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ source: |-
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"source":{"host":"source-do-user-6607903-0.b.db.ondigitalocean.com","dbname":"defaultdb","port":25060,"username":"doadmin","password":"paakjnfe10rsrsmf"},"disable_ssl":false}' \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration"
-d '{"source":{"host":"source-do-user-6607903-0.b.db.ondigitalocean.com","dbname":"defaultdb","port":25060,"username":"doadmin","password":"paakjnfe10rsrsmf"},"disable_ssl":false,"ignore_dbs":["db0","db1"]}' \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ source: |-
"password": "paakjnfe10rsrsmf"
},
"disable_ssl": False
"ignore_dbs": ["db0","db1"]
}
update_resp = client.databases.update_online_migration(database_cluster_uuid="a7a8bas", body=req)
9 changes: 9 additions & 0 deletions specification/resources/databases/models/source_database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ properties:
type: boolean
description: Enables SSL encryption when connecting to the source database.
example: false
ignore_dbs:
type: array
items:
type: string
example:
- db0
- db1
default: []
description: List of databases that should be ignored during migration.

0 comments on commit 423c2d3

Please sign in to comment.