Commit ba7cbae
committed
refactor: split top level client from base client (#534)
Squashed commit of the following:
commit 4ff9fbc
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:54:47 2025 +0200
test: timeout handling
commit 13f7c0b
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:33:26 2025 +0200
test: fix speed optimization
commit 458631d
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:29:50 2025 +0200
test: use parent to access other resources clients
commit f69a609
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:28:13 2025 +0200
test: update request_mock fixture
commit d565239
Author: jo <ljonas@riseup.net>
Date: Tue Aug 12 15:57:25 2025 +0200
refactor: use parent to access other resources clients (2)
commit 1703985
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:25:51 2025 +0200
refactor: use parent to access other resources clients (1)
commit adb9232
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:24:50 2025 +0200
refactor: use type from inherited resource client property
commit 3b6c712
Author: jo <ljonas@riseup.net>
Date: Thu Aug 14 16:18:29 2025 +0200
refactor: split top level client from base client
Split the top level client used to gather all resource client in a single class, from the base client actually doing the requests to the API.
This allows us for example to swap or modify the base client in a resource client, that might need a different base client (session, endpoint, headers, ...).1 parent ce802c7 commit ba7cbae
File tree
31 files changed
+545
-499
lines changed- hcloud
- actions
- certificates
- core
- datacenters
- firewalls
- floating_ips
- images
- isos
- load_balancer_types
- load_balancers
- locations
- networks
- placement_groups
- primary_ips
- server_types
- servers
- ssh_keys
- volumes
- tests/unit
- actions
- certificates
- firewalls
- floating_ips
- images
- load_balancers
- networks
- primary_ips
- servers
- volumes
31 files changed
+545
-499
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
| |||
113 | 132 | | |
114 | 133 | | |
115 | 134 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| |||
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
163 | 170 | | |
164 | 171 | | |
165 | 172 | | |
| |||
257 | 264 | | |
258 | 265 | | |
259 | 266 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | 267 | | |
283 | 268 | | |
284 | 269 | | |
285 | 270 | | |
286 | 271 | | |
287 | 272 | | |
288 | | - | |
| 273 | + | |
289 | 274 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
294 | 278 | | |
295 | | - | |
| 279 | + | |
296 | 280 | | |
297 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
298 | 284 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
304 | 303 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
311 | 319 | | |
312 | | - | |
| 320 | + | |
313 | 321 | | |
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
318 | | - | |
| 326 | + | |
319 | 327 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
323 | 331 | | |
324 | 332 | | |
325 | | - | |
| 333 | + | |
326 | 334 | | |
327 | | - | |
| 335 | + | |
| 336 | + | |
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | | - | |
| 341 | + | |
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
| |||
338 | 347 | | |
339 | 348 | | |
340 | 349 | | |
341 | | - | |
| 350 | + | |
342 | 351 | | |
343 | 352 | | |
344 | 353 | | |
345 | 354 | | |
346 | 355 | | |
347 | | - | |
| 356 | + | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
70 | | - | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
107 | | - | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | | - | |
| 250 | + | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
| |||
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
331 | | - | |
| 330 | + | |
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
| |||
368 | 367 | | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
| 370 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | | - | |
| 19 | + | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
| 25 | + | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
34 | | - | |
| 31 | + | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
| |||
0 commit comments