Commit 20677f3
committed
bug: Fix parsing of nested objects in lists
This fixes tests, and the lke cluster-create operation.
As it happens, the CLI did not parse optional list arguments correctly
(namely, if an optional argument to a list was omitted, the list would
not be created and no items in the list would populate correctly.
Compounding this, objects nested in objects within lists did not
properly restructure after being flattened for the command line. This
caused nested objects in lists to be sent incorrectly.
Both of the above broke the `linode-cli lke cluster-create` endpoint,
and thereby tests, when `autoscaler` was added to that endpoint, nested
within the `node_pools` object in a list. This change fixes the issues,
allowing this endpoint to work again.
:warning: I did not write this to handle multiple layers of object
nesting in lists. I will revisit this if it ever becomes necessary - I
left a comment noting where it would be handled.1 parent 9b7a170 commit 20677f3
1 file changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
195 | | - | |
| 194 | + | |
196 | 195 | | |
197 | 196 | | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
206 | 234 | | |
207 | 235 | | |
208 | 236 | | |
| |||
219 | 247 | | |
220 | 248 | | |
221 | 249 | | |
| 250 | + | |
222 | 251 | | |
223 | 252 | | |
224 | 253 | | |
| |||
0 commit comments