Skip to content

Commit

Permalink
clean linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenVarela committed Nov 27, 2024
1 parent 7d139c6 commit bca6088
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pool_create
operationId: autoscalepools_create

summary: Create a New Autoscale Pool

Expand All @@ -16,8 +16,10 @@ requestBody:
schema:
$ref: 'models/autoscale_pool_create.yml'
examples:
Autoscale Create Request:
$ref: 'examples.yml#/autoscale_create_request'
Autoscale Create Request Dynamic Config:
$ref: 'examples.yml#/autoscale_create_request_dynamic'
Autoscale Create Request Static Config:
$ref: 'examples.yml#/autoscale_create_request_static'

responses:
'202':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationID: autoscale_delete
operationId: autoscalepools_delete

summary: Delete autoscale pool

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationID: autoscale_delete_dangerouts
operationId: autoscalepools_delete_dangerous

summary: Delete autoscale pool and resources

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pool_get
operationId: autoscalepools_get

summary: Retrieve an Existing Autoscale Pool

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pools_list
operationId: autoscalepools_list

summary: List All Autoscale Pools

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pools_history_list
operationId: autoscalepools_list_history

summary: List history events

Expand All @@ -14,6 +14,7 @@ tags:
parameters:
- $ref: '../../shared/parameters.yml#/per_page'
- $ref: '../../shared/parameters.yml#/page'
- $ref: 'parameters.yml#/autoscale_pool_id'

responses:
'200':
Expand All @@ -22,6 +23,9 @@ responses:
'401':
$ref: '../../shared/responses/unauthorized.yml'

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pool_members_list
operationId: autoscalepools_list_members

summary: List members

Expand All @@ -14,6 +14,7 @@ tags:
parameters:
- $ref: '../../shared/parameters.yml#/per_page'
- $ref: '../../shared/parameters.yml#/page'
- $ref: 'parameters.yml#/autoscale_pool_id'

responses:
'200':
Expand All @@ -22,6 +23,9 @@ responses:
'401':
$ref: '../../shared/responses/unauthorized.yml'

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
operationId: autoscale_pool_update
operationId: autoscalepools_update

summary: Update Autoscale Pool

Expand Down Expand Up @@ -29,6 +29,9 @@ responses:
'401':
$ref: '../../shared/responses/unauthorized.yml'

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

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

Expand Down
22 changes: 21 additions & 1 deletion specification/resources/autoscale_pools/examples.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
autoscale_create_request:
autoscale_create_request_dynamic:
value:
name: "my-autoscale-pool"
config:
Expand All @@ -21,6 +21,26 @@ autoscale_create_request:
- web
user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n"
vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000
autoscale_create_request_static:
value:
name: "my-autoscale-pool"
config:
target_number_instances: 2
droplet_template:
name: example.com
region: nyc3
size: c-2
image: ubuntu-20-04-x64
ssh_keys:
- 3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45
backups: true
ipv6: true
monitoring: true
tags:
- env:prod
- web
user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n"
vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000
autoscale_update_request:
value:
name: "my-autoscale-pool"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ properties:
- deleting
- error
description: The current status of the autoscale pool.
example: active

active_resources_count:
type: integer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type: object

properties:
name:
type: string
Expand All @@ -6,6 +8,7 @@ properties:

region:
type: string
example: tor1
enum:
- nyc1
- nyc2
Expand Down Expand Up @@ -33,31 +36,37 @@ properties:
type: array
items:
type: string
example: "88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"
example:
- "88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"
description: The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint.

tags:
type: array
items:
type: string
example: my-tag
example:
- my-tag
description: The tags to apply to each of the Droplets in the autoscale pool.

vpc_uuid:
type: string
description: The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets.
example: 760e09ef-dc84-11e8-981e-3cfdfeaae000

with_droplet_agent:
type: boolean
description: Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling.
example: true

project_id:
type: string
description: The project that the Droplets in the autoscaling pool will belong to.
example: 746c6152-2fa2-11ed-92d3-27aaa54e4988

ipv6:
type: boolean
description: Assigns a unique IPv6 address to each of the Droplets in the autoscaling pool.
example: true

user_data:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type: object

properties:
min_instances:
type: integer
Expand All @@ -12,13 +14,15 @@ properties:
minimum: 0
maximum: 1000
target_cpu_utilization:
type: float
type: number
format: float
example: 0.6
description: Target CPU utilization as a decimal.
minimum: 0
maximum: 1
target_memory_utilization:
type: float
type: number
format: float
example: 0.6
description: Target memory utilization as a decimal.
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type: object

properties:
target_number_instances:
title: static config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ type: object

properties:
memory:
type: float
type: number
format: float
example: 0.3588531587713522
description: The average memory utilization of the autoscale pool.
minimum: 0
maximum: 1
cpu:
type: float
type: number
format: float
example: 0.0007338008770232183
description: The average CPU utilization of the autoscale pool.
minimum: 0
Expand Down
2 changes: 2 additions & 0 deletions specification/resources/autoscale_pools/models/history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ properties:
- SCALE_UP
- SCALE_DOWN
description: The reason for the scaling event.
example: 'CONFIGURATION_CHANGE'
status:
type: string
enum:
- in_progress
- success
- error
description: The status of the scaling event.
example: 'success'
created_at:
format: date-time
description: The creation time of the history event in ISO8601 combined date and time format.
Expand Down
1 change: 1 addition & 0 deletions specification/resources/autoscale_pools/models/member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ properties:
- deleting
- "off"
description: The power status of the Droplet.
example: "active"
current_utilization:
$ref: ../models/member_current_utilization.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ type: object

properties:
memory:
type: float
type: number
format: float
example: 0.3588531587713522
description: The memory utilization average of the individual Droplet.
cpu:
type: float
type: number
format: float
example: 0.0007338008770232183
description: The CPU utilization average of the individual Droplet.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ content:
properties:
autoscale_pool:
$ref: '../models/autoscale_pool.yml'

examples:
Autoscale Create Response Dynamic Config:
$ref: 'examples.yml#/autoscale_create_response_dynamic'
Autoscale Create Response Static Config:
$ref: 'examples.yml#/autoscale_create_response_static'
Loading

0 comments on commit bca6088

Please sign in to comment.