Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imaskm committed Nov 27, 2024
1 parent 87bd148 commit 2867620
Show file tree
Hide file tree
Showing 25 changed files with 100 additions and 132 deletions.
14 changes: 7 additions & 7 deletions specification/DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,14 @@ tags:
Reserved IPs are bound to a specific region.
- name: Reserved IPv6s
- name: "[Beta] Reserved IPv6"
description: |-
DigitalOcean Reserved IPv6s are publicly-accessible static IP addresses that can be
mapped to one of your Droplets. They can be used to create highly available
setups or other configurations requiring movable addresses.
Reserved IPv6s are bound to a specific region.
- name: Reserved IPv6 Actions
- name: "[Beta] Reserved IPv6 Actions"
description: |-
Reserved IPv6 actions requests are made on the actions endpoint of a specific
reserved IPv6.
Expand Down Expand Up @@ -1602,21 +1602,21 @@ paths:

/v2/reserved_ipv6:
get:
$ref: 'resources/reserved_ipv6/reservedIPv6s_list.yml'
$ref: 'resources/reserved_ipv6/reservedIPv6_list.yml'

post:
$ref: 'resources/reserved_ipv6/reservedIPv6s_create.yml'
$ref: 'resources/reserved_ipv6/reservedIPv6_create.yml'

/v2/reserved_ipv6/{reserved_ipv6}:
get:
$ref: 'resources/reserved_ipv6/reservedIPv6s_get.yml'
$ref: 'resources/reserved_ipv6/reservedIPv6_get.yml'

delete:
$ref: 'resources/reserved_ipv6/reservedIPv6s_delete.yml'
$ref: 'resources/reserved_ipv6/reservedIPv6_delete.yml'

/v2/reserved_ipv6/{reserved_ipv6}/actions:
post:
$ref: 'resources/reserved_ipv6/reservedIPv6sActions_post.yml'
$ref: 'resources/reserved_ipv6/reservedIPv6Actions_post.yml'

/v2/sizes:
get:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ source: |-
client := godo.NewFromToken(token)
ctx := context.TODO()
_, err := client.ReservedIPV6s.Delete(ctx, "2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
_, err := client.ReservedIPV6.Delete(ctx, "2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ source: |-
PerPage: 200,
}
reservedIPs, _, err := client.ReservedIPV6s.List(ctx, opt)
reservedIPs, _, err := client.ReservedIPV6.List(ctx, opt)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ source: |-
"region_slug": nyc3
}
resp = client.reserved_ipv6s.create(body=req)
resp = client.reserved_ipv6.create(body=req)
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source: |-
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.reserved_ipv6s.delete(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
resp = client.reserved_ipv6.delete(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source: |-
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.reserved_ipv6s.get(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
resp = client.reserved_ipv6.get(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e")
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source: |-
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.reserved_ips.list()
resp = client.reserved_ipv6.list()
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ source: |-
"type": "unassign"
}
resp = client.reserved_ips_actions.post(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e", body=req)
resp = client.reserved_ipv6_actions.post(ip="2409:40d0:f7:1017:74b4:3a96:105e:4c6e", body=req)
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source: |-
client = DropletKit::Client.new(access_token: token)
reserved_ip = DropletKit::ReservedIpv6.new(region_slug: nyc3)
client.reserved_ipv6s.create(reserved_ip)
client.reserved_ipv6.create(reserved_ip)
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source: |-
token = ENV['DIGITALOCEAN_TOKEN']
client = DropletKit::Client.new(access_token: token)
client.reserved_ipv6s.delete(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
client.reserved_ipv6.delete(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source: |-
token = ENV['DIGITALOCEAN_TOKEN']
client = DropletKit::Client.new(access_token: token)
client.reserved_ipv6s.find(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
client.reserved_ipv6.find(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ source: |-
token = ENV['DIGITALOCEAN_TOKEN']
client = DropletKit::Client.new(access_token: token)
reserved_ips = client.reserved_ipv6s.all
reserved_ips = client.reserved_ipv6.all
reserved_ips.each
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: |-
client = DropletKit::Client.new(access_token: token)
# Assign a Reserved IPv6 to a Droplet
client.reserved_ip_actions.assign(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e', droplet_id: 8219222)
client.reserved_ipv6_actions.assign(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e', droplet_id: 8219222)
# Unassign a Reserved IPv6
# client.reserved_ip_actions.unassign(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
# client.reserved_ipv6_actions.unassign(ip: '2409:40d0:f7:1017:74b4:3a96:105e:4c6e')
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ properties:
example: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e
description: The public IP address of the reserved IPv6. It also serves as its
identifier.

reserved_at:
type: string
format: date-time
example: "2024-11-20T11:08:30Z"
description: The date and time when the reserved IPv6 was reserved.

region_slug:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
type: object
properties:
reserved_ipv6s:
type: array
items:
properties:
ip:
type: string
format: ipv6
example: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e
description: The public IP address of the reserved IPv6. It also serves as its
identifier.
region_slug:
type: string
description: The region that the reserved IPv6 is reserved to. When you
query a reserved IPv6,the region_slug will be returned.
example: nyc3
reserved_at:
type: string
format: date-time
example: '2020-01-01T00:00:00Z'
droplet:
$ref: '../../droplets/models/droplet.yml'
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
operationId: reservedIPv6sActions_post
operationId: reservedIPv6Actions_post

summary: Initiate a Reserved IPv6 Action
summary: "[Beta] Initiate a Reserved IPv6 Action"

description: |
To initiate an action on a reserved IPv6 send a POST request to
`/v2/reserved_ipv6/$RESERVED_IP/actions`. In the JSON body to the request,
`/v2/reserved_ipv6/$RESERVED_IPV6/actions`. In the JSON body to the request,
set the `type` attribute to on of the supported action types:
| Action | Details
Expand All @@ -13,7 +13,7 @@ description: |
| `unassign` | Unassign a reserved IPv6 from a Droplet
tags:
- Reserved IPv6 Actions
- "[Beta] Reserved IPv6 Actions"

parameters:
- $ref: 'parameters.yml#/reserved_ipv6'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
operationId: reservedIPv6s_create
operationId: reservedIPv6_create

summary: Create a New Reserved IPv6
summary: "[Beta] Create a New Reserved IPv6"

description: >-
On creation, a reserved IPv6 must be reserved to a region.
Expand All @@ -10,7 +10,7 @@ description: >-
tags:
- Reserved IPv6s
- "[Beta] Reserved IPv6"

requestBody:
required: true
Expand All @@ -21,7 +21,7 @@ requestBody:
$ref: 'models/reserved_ipv6_create.yml'

responses:
'202':
'200':
$ref: 'responses/reserved_ipv6_create.yml'

'401':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
operationId: reservedIPv6s_delete
operationId: reservedIPv6_delete

summary: Delete a Reserved IPv6
summary: "[Beta] Delete a Reserved IPv6"

description: |
To delete a reserved IP and remove it from your account, send a DELETE request
to `/v2/reserved_ipv6/$RESERVED_IP_ADDR`.
to `/v2/reserved_ipv6/$RESERVED_IPV6`.
A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully.
tags:
- Reserved IPv6s
- "[Beta] Reserved IPv6"

parameters:
- $ref: 'parameters.yml#/reserved_ipv6'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
operationId: reservedIPv6s_get
operationId: reservedIPv6_get

summary: Retrieve an Existing Reserved IPv6
summary: "[Beta] Retrieve an Existing Reserved IPv6"

description: To show information about a reserved IPv6, send a GET request to
`/v2/reserved_ipv6/$RESERVED_IP_ADDR`.
`/v2/reserved_ipv6/$RESERVED_IPV6`.

tags:
- Reserved IPv6s
- "[Beta] Reserved IPv6"

parameters:
- $ref: 'parameters.yml#/reserved_ipv6'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
operationId: reservedIPv6s_list
operationId: reservedIPv6_list

summary: List All Reserved IPv6s
summary: "[Beta] List All Reserved IPv6s"

description: To list all of the reserved IPv6s available on your account, send a
GET request to `/v2/reserved_ipv6`.

tags:
- Reserved IPv6s
- "[Beta] Reserved IPv6"

parameters:
- $ref: '../../shared/parameters.yml#/per_page'
Expand Down
2 changes: 2 additions & 0 deletions specification/resources/reserved_ipv6/responses/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ reserved_ipv6_reserved:
value:
ip: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e
region_slug: nyc3
reserved_at: 2024-11-20T11:08:30Z

reserved_ipv6_assigned:
summary: Assigned to Droplet
value:
ip: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e
reserved_at: 2024-11-20T11:08:30Z
droplet:
id: 3164444
name: example.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
description: The response will be a JSON object with a key called `reserved_ip`.
The value of this will be an object that contains the standard attributes
description: The response will be a JSON object. The value of this will be an object that contains the standard attributes
associated with a reserved IPv6.

headers:
Expand All @@ -13,10 +12,7 @@ headers:
content:
application/json:
schema:
type: object
properties:
reserved_ipv6:
$ref: '../models/reserved_ipv6.yml'
$ref: '../models/reserved_ipv6.yml'

examples:
reserved_ipv6_assigned:
Expand Down

This file was deleted.

Loading

0 comments on commit 2867620

Please sign in to comment.