Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions specification/resources/sizes/parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
cpu_minimum:
in: query
name: cpu_minimum
description: Filter sizes with an inclusive minimum CPU count
required: false
schema:
type: integer
minimum: 1
example: 4

cpu_maximum:
in: query
name: cpu_maximum
description: Filter sizes with an inclusive maximum CPU count
required: false
schema:
type: integer
minimum: 1
example: 4

gpu_minimum:
in: query
name: gpu_minimum
description: Filter sizes with an inclusive minimum GPU count
required: false
schema:
type: integer
minimum: 1
example: 1

gpu_maximum:
in: query
name: gpu_maximum
description: Filter sizes with an inclusive maximum GPU count. Zero is allowed to filter to sizes without GPUs.
required: false
schema:
type: integer
minimum: 0
example: 8

gpu_fabric:
in: query
name: gpu_fabric
description: Filter sizes to those with a given GPU fabric setting
required: false
schema:
type: boolean

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpu_fabric is not on the size/gpu_info response, should we document it there or clarify what true/false means here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fabric is a property of some 8x GPU sizes. it's to do with the networking between GPUs. customers who use this feature are very aware of it.

currently this information is baked into the slug name, which is a bit suboptimal. We could also supplement the gpu object to have a fabric boolean. I'll make a note here to bring this idea up with the team at standup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a fabric boolean has been added to the GPU info object

example: true

memory_minimum:
in: query
name: memory_minimum
description: Filter sizes with an inclusive minimum memory amount (in megabytes)
required: false
schema:
type: integer
multipleOf: 8
minimum: 8
example: 1024

memory_maximum:
in: query
name: memory_maximum
description: Filter sizes with an inclusive maximum memory amount (in megabytes)
required: false
schema:
type: integer
multipleOf: 8
minimum: 8
example: 1024

price_hourly_minimum:
in: query
name: price_hourly_minimum
description: Filter sizes with an inclusive minimum hourly price (in USD)
required: false
schema:
type: string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Size prices are number/float, should these filters match that, or stay string with a pattern if the API expects decimals?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string should be ok here. we're transitioning our price outputs to string as well.

ideally all currencies would be presented as strings.

example: "0.50"

price_hourly_maximum:
in: query
name: price_hourly_maximum
description: Filter sizes with an inclusive maximum hourly price (in USD)
required: false
schema:
type: string
example: "1.00"

price_monthly_minimum:
in: query
name: price_monthly_minimum
description: Filter sizes with an inclusive minimum monthly price (in USD)
required: false
schema:
type: string
example: "5.00"

price_monthly_maximum:
in: query
name: price_monthly_maximum
description: Filter sizes with an inclusive maximum monthly price (in USD)
required: false
schema:
type: string
example: "10.00"
11 changes: 11 additions & 0 deletions specification/resources/sizes/sizes_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ tags:
parameters:
- $ref: '../../shared/parameters.yml#/per_page'
- $ref: '../../shared/parameters.yml#/page'
- $ref: 'parameters.yml#/cpu_minimum'
- $ref: 'parameters.yml#/cpu_maximum'
- $ref: 'parameters.yml#/gpu_minimum'
- $ref: 'parameters.yml#/gpu_maximum'
- $ref: 'parameters.yml#/gpu_fabric'
- $ref: 'parameters.yml#/memory_minimum'
- $ref: 'parameters.yml#/memory_maximum'
- $ref: 'parameters.yml#/price_hourly_minimum'
- $ref: 'parameters.yml#/price_hourly_maximum'
- $ref: 'parameters.yml#/price_monthly_minimum'
- $ref: 'parameters.yml#/price_monthly_maximum'

responses:
'200':
Expand Down
Loading