Skip to content

Commit 4a4896d

Browse files
committed
bug: Fix linode-cli nodebalancers config-rebuild command
This is for linode/linode-cli#226 Looks like the spec for this endpoint was wrong, so the CLI didn't work. This change fixes the spec to match what the endpoint wants, and in turn fixes the CLI.
1 parent 5190948 commit 4a4896d

File tree

1 file changed

+23
-31
lines changed

1 file changed

+23
-31
lines changed

openapi.yaml

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11222,7 +11222,7 @@ paths:
1122211222
Rebuilds a NodeBalancer Config and its Nodes that you have
1122311223
permission to modify.
1122411224
operationId: rebuildNodeBalancerConfig
11225-
x-linode-cli-action: rebuild
11225+
x-linode-cli-action: config-rebuild
1122611226
security:
1122711227
- personalAccessToken: []
1122811228
- oauth:
@@ -11234,33 +11234,24 @@ paths:
1123411234
content:
1123511235
application/json:
1123611236
schema:
11237-
properties:
11238-
configs:
11239-
type: array
11240-
description: >
11241-
Each config must have a unique port and at least one Node. Additionally:
11242-
* Current Nodes excluded from the request body will be deleted.
11243-
* Current Nodes (identified by their ID) will be updated.
11244-
* New Nodes (included without an ID) will be created.
11245-
items:
11246-
allOf:
11247-
- $ref: '#/components/schemas/NodeBalancerConfig'
11248-
- type: object
11249-
properties:
11250-
nodes:
11251-
type: array
11252-
description: >
11253-
The NodeBalancer Node(s) that serve this port.
11254-
At least one Node is required per configured port.
11237+
allOf:
11238+
- $ref: "#/components/schemas/NodeBalancerConfig"
11239+
- type: object
11240+
properties:
11241+
nodes:
11242+
type: array
11243+
description: >
11244+
The NodeBalancer Node(s) that serve this port.
11245+
At least one Node is required per configured port.
1125511246

11256-
Some considerations for Nodes when rebuilding a config:
11257-
* Current Nodes excluded from the request body will be deleted.
11258-
* Current Nodes (identified by their ID) will be updated.
11259-
* New Nodes (included without an ID) will be created.
11260-
items:
11261-
type: object
11262-
allOf:
11263-
- $ref: '#/components/schemas/NodeBalancerNode'
11247+
Some considerations for Nodes when rebuilding a config:
11248+
* Current Nodes excluded from the request body will be deleted.
11249+
* Current Nodes (identified by their ID) will be updated.
11250+
* New Nodes (included without an ID) will be created.
11251+
items:
11252+
type: object
11253+
allOf:
11254+
- $ref: '#/components/schemas/NodeBalancerNode'
1126411255
responses:
1126511256
'200':
1126611257
description: NodeBalancer created successfully.
@@ -11291,15 +11282,14 @@ paths:
1129111282
"cipher_suite": "recommended",
1129211283
"nodes": [
1129311284
{
11294-
"id": 543231,
1129511285
"address": "192.168.210.120:80",
11296-
"label": "node54321",
11286+
"label": "node1",
1129711287
"weight": 50,
1129811288
"mode": "accept"
1129911289
},
1130011290
{
1130111291
"address": "192.168.210.122:81",
11302-
"label": "thenewnode",
11292+
"label": "node2",
1130311293
"weight": 50,
1130411294
"mode": "accept"
1130511295
},
@@ -11322,7 +11312,9 @@ paths:
1132211312
--check_body "it works" \
1132311313
--check_passive true \
1132411314
--proxy_protocol "v1" \
11325-
--cipher_suite recommended
11315+
--cipher_suite recommended \
11316+
--nodes '{"address":"192.168.210.120:80","label":"node1","weight":50,"mode":"accept"}' \
11317+
--nodes '{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}'
1132611318
/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes:
1132711319
parameters:
1132811320
- name: nodeBalancerId

0 commit comments

Comments
 (0)