Skip to content

Commit

Permalink
DBAAS-4482: Add missing storage_size_mib in public api for creating r…
Browse files Browse the repository at this point in the history
…ead-replica (#840)
  • Loading branch information
shabtaisharon authored Nov 7, 2023
1 parent a4755ec commit 7a717b3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ requestBody:
name: read-nyc3-01
region: nyc3
size: db-s-2vcpu-4gb
storage_size_mib: 61440

responses:
'201':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ source: |-
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"name":"read-nyc3-01", "region":"nyc3", "size": "db-s-2vcpu-4gb"}' \
-d '{"name":"read-nyc3-01", "region":"nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440}' \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas"
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ source: |-
Name: "read-nyc3-01",
Region: "nyc3",
Size: "db-s-2vcpu-4gb",
StorageSizeMiB : 61440,
}
replica, _, err := client.Databases.CreateReplica(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", replicaRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ source: |-
create_req = {
"name": "read-nyc3-01",
"region": "nyc3",
"size": "db-s-2vcpu-4gb"
"size": "db-s-2vcpu-4gb",
"storage_size_mib": 61440,
}
create_resp = client.databases.create_replica(database_cluster_uuid="9cc10173", body=create_req)
6 changes: 6 additions & 0 deletions specification/resources/databases/models/database_replica.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ properties:
allOf:
- readOnly: true
- $ref: './database_connection.yml'
storage_size_mib:
type: integer
example: 61440
description: >-
Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond
what is provided as a base amount from the 'size' and any previously added additional storage.
required:
- name

0 comments on commit 7a717b3

Please sign in to comment.