Skip to content

Commit 0da9730

Browse files
committed
fix after review
1 parent 972c925 commit 0da9730

21 files changed

+583
-1125
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ jobs:
4141
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
4242
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
4343
SCW_DEFAULT_REGION: ${{ secrets.SCW_DEFAULT_REGION }}
44-
CI: true
44+
REPLAY_CASSETTES: true
4545
run: poetry run pytest -v
4646

.github/workflows/nightly.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Python
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version: ${{ matrix.python-version }}
25+
python-version: ${{ matrix.python }}
2626
cache: "poetry"
2727
- name: Install dependencies and library
2828
run: poetry install
@@ -52,5 +52,4 @@ jobs:
5252
${SLACK_WEBHOOK_NIGHTLY};
5353
env:
5454
SLACK_WEBHOOK_NIGHTLY: ${{ secrets.SLACK_WEBHOOK_NIGHTLY }}
55-
FAILED_PRODUCT: ${{ matrix
56-
.products }}
55+
FAILED_PRODUCT: "${{ matrix.products }}"

scaleway/scaleway/instance/v1/tests/cassettes/instance_volume.cassette.yaml

Lines changed: 53 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interactions:
1313
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers
1414
response:
1515
body:
16-
string: '{"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture",
16+
string: '{"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture",
1717
"arch": "x86_64", "commercial_type": "DEV1-S", "boot_type": "local", "organization":
1818
"11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
1919
"hostname": "test-sdk-python-fixture", "image": {"id": "c00ae53c-1e29-4087-a384-47f3c5c1cd84",
@@ -23,42 +23,32 @@ interactions:
2323
"extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2025-02-03T13:36:50.774356+00:00",
2424
"modification_date": "2025-02-03T13:36:50.774356+00:00", "default_bootscript":
2525
null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"},
26-
"volumes": {"0": {"boot": false, "id": "f8e5b903-085c-4d61-a894-9d69a11f59d2",
26+
"volumes": {"0": {"boot": false, "id": "2156957e-5432-4619-9310-98a910819695",
2727
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri":
2828
null, "organization": "11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
29-
"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture"},
30-
"size": 10000000000, "state": "available", "creation_date": "2025-08-29T07:51:17.993882+00:00",
31-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "tags": [], "zone":
29+
"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture"},
30+
"size": 10000000000, "state": "available", "creation_date": "2025-09-02T07:48:14.220889+00:00",
31+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "tags": [], "zone":
3232
"fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail":
33-
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c5:be:8b",
33+
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c6:49:6b",
3434
"routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required":
35-
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-08-29T07:51:17.993882+00:00",
36-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "bootscript": null,
35+
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-09-02T07:48:14.220889+00:00",
36+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "bootscript": null,
3737
"security_group": {"id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default
3838
security group"}, "location": null, "maintenances": [], "allowed_actions":
3939
["poweron", "backup"], "placement_group": null, "private_nics": [], "zone":
4040
"fr-par-1", "filesystems": [], "end_of_service": false}}'
4141
headers:
4242
content-length:
4343
- '2163'
44-
content-security-policy:
45-
- default-src 'none'; frame-ancestors 'none'
46-
content-type:
47-
- application/json
4844
date:
49-
- Fri, 29 Aug 2025 07:51:18 GMT
45+
- Tue, 02 Sep 2025 07:48:14 GMT
5046
location:
51-
- https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/71a1d133-0e17-4440-b305-b4e1dca55870
47+
- https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/56f0c6bd-b659-4aec-b885-c408b4f9c93d
5248
server:
53-
- Scaleway API Gateway (fr-par-2;edge01)
54-
strict-transport-security:
55-
- max-age=63072000
56-
x-content-type-options:
57-
- nosniff
58-
x-frame-options:
59-
- DENY
49+
- Scaleway API Gateway (fr-par-3;edge01)
6050
x-request-id:
61-
- bd5e285a-63e6-4af0-8eae-e975169bc4b9
51+
- 448bb17c-a545-4eac-ad9d-0c99149a39a3
6252
status:
6353
code: 201
6454
message: Created
@@ -70,10 +60,10 @@ interactions:
7060
user-agent:
7161
- scaleway-sdk-python/2.0.0
7262
method: GET
73-
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/71a1d133-0e17-4440-b305-b4e1dca55870
63+
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/56f0c6bd-b659-4aec-b885-c408b4f9c93d
7464
response:
7565
body:
76-
string: '{"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture",
66+
string: '{"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture",
7767
"arch": "x86_64", "commercial_type": "DEV1-S", "boot_type": "local", "organization":
7868
"11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
7969
"hostname": "test-sdk-python-fixture", "image": {"id": "c00ae53c-1e29-4087-a384-47f3c5c1cd84",
@@ -83,55 +73,45 @@ interactions:
8373
"extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2025-02-03T13:36:50.774356+00:00",
8474
"modification_date": "2025-02-03T13:36:50.774356+00:00", "default_bootscript":
8575
null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"},
86-
"volumes": {"0": {"boot": false, "id": "f8e5b903-085c-4d61-a894-9d69a11f59d2",
76+
"volumes": {"0": {"boot": false, "id": "2156957e-5432-4619-9310-98a910819695",
8777
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri":
8878
null, "organization": "11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
89-
"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture"},
90-
"size": 10000000000, "state": "available", "creation_date": "2025-08-29T07:51:17.993882+00:00",
91-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "tags": [], "zone":
79+
"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture"},
80+
"size": 10000000000, "state": "available", "creation_date": "2025-09-02T07:48:14.220889+00:00",
81+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "tags": [], "zone":
9282
"fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail":
93-
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c5:be:8b",
83+
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c6:49:6b",
9484
"routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required":
95-
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-08-29T07:51:17.993882+00:00",
96-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "bootscript": null,
85+
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-09-02T07:48:14.220889+00:00",
86+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "bootscript": null,
9787
"security_group": {"id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default
9888
security group"}, "location": null, "maintenances": [], "allowed_actions":
9989
["poweron", "backup"], "placement_group": null, "private_nics": [], "zone":
10090
"fr-par-1", "filesystems": [], "end_of_service": false}}'
10191
headers:
10292
content-length:
10393
- '2163'
104-
content-security-policy:
105-
- default-src 'none'; frame-ancestors 'none'
106-
content-type:
107-
- application/json
10894
date:
109-
- Fri, 29 Aug 2025 07:51:18 GMT
95+
- Tue, 02 Sep 2025 07:48:14 GMT
11096
server:
111-
- Scaleway API Gateway (fr-par-2;edge01)
112-
strict-transport-security:
113-
- max-age=63072000
114-
x-content-type-options:
115-
- nosniff
116-
x-frame-options:
117-
- DENY
97+
- Scaleway API Gateway (fr-par-3;edge02)
11898
x-request-id:
119-
- 46d2c340-ac64-419b-a291-138c61d6695c
99+
- c0ffafcb-6a61-4cb3-9c58-f90b8cc3761b
120100
status:
121101
code: 200
122102
message: OK
123103
- request:
124-
body: '{"volume_id": "8b7d43ec-bb58-4d1b-9fd3-0fdfff049f32"}'
104+
body: '{"volume_id": "6a371d9d-1edb-4c62-a49b-33852b4704d1"}'
125105
headers:
126106
Content-Length:
127107
- '53'
128108
user-agent:
129109
- scaleway-sdk-python/2.0.0
130110
method: POST
131-
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/71a1d133-0e17-4440-b305-b4e1dca55870/detach-volume
111+
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/56f0c6bd-b659-4aec-b885-c408b4f9c93d/detach-volume
132112
response:
133113
body:
134-
string: '{"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture",
114+
string: '{"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture",
135115
"arch": "x86_64", "commercial_type": "DEV1-S", "boot_type": "local", "organization":
136116
"11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
137117
"hostname": "test-sdk-python-fixture", "image": {"id": "c00ae53c-1e29-4087-a384-47f3c5c1cd84",
@@ -141,40 +121,30 @@ interactions:
141121
"extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2025-02-03T13:36:50.774356+00:00",
142122
"modification_date": "2025-02-03T13:36:50.774356+00:00", "default_bootscript":
143123
null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"},
144-
"volumes": {"0": {"boot": false, "id": "f8e5b903-085c-4d61-a894-9d69a11f59d2",
124+
"volumes": {"0": {"boot": false, "id": "2156957e-5432-4619-9310-98a910819695",
145125
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri":
146126
null, "organization": "11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
147-
"server": {"id": "71a1d133-0e17-4440-b305-b4e1dca55870", "name": "test-sdk-python-fixture"},
148-
"size": 10000000000, "state": "available", "creation_date": "2025-08-29T07:51:17.993882+00:00",
149-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "tags": [], "zone":
127+
"server": {"id": "56f0c6bd-b659-4aec-b885-c408b4f9c93d", "name": "test-sdk-python-fixture"},
128+
"size": 10000000000, "state": "available", "creation_date": "2025-09-02T07:48:14.220889+00:00",
129+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "tags": [], "zone":
150130
"fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail":
151-
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c5:be:8b",
131+
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c6:49:6b",
152132
"routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required":
153-
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-08-29T07:51:17.993882+00:00",
154-
"modification_date": "2025-08-29T07:51:17.993882+00:00", "bootscript": null,
133+
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-09-02T07:48:14.220889+00:00",
134+
"modification_date": "2025-09-02T07:48:14.220889+00:00", "bootscript": null,
155135
"security_group": {"id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default
156136
security group"}, "location": null, "maintenances": [], "allowed_actions":
157137
["poweron", "backup"], "placement_group": null, "private_nics": [], "zone":
158138
"fr-par-1", "filesystems": [], "end_of_service": false}}'
159139
headers:
160140
content-length:
161141
- '2163'
162-
content-security-policy:
163-
- default-src 'none'; frame-ancestors 'none'
164-
content-type:
165-
- application/json
166142
date:
167-
- Fri, 29 Aug 2025 07:51:24 GMT
143+
- Tue, 02 Sep 2025 07:48:19 GMT
168144
server:
169-
- Scaleway API Gateway (fr-par-2;edge01)
170-
strict-transport-security:
171-
- max-age=63072000
172-
x-content-type-options:
173-
- nosniff
174-
x-frame-options:
175-
- DENY
145+
- Scaleway API Gateway (fr-par-3;edge02)
176146
x-request-id:
177-
- 6db51310-deee-425e-a8b0-88c4cfab2139
147+
- 0a93b8a3-53ed-4510-8162-d4e64e56af4f
178148
status:
179149
code: 200
180150
message: OK
@@ -186,34 +156,24 @@ interactions:
186156
user-agent:
187157
- scaleway-sdk-python/2.0.0
188158
method: GET
189-
uri: https://api.scaleway.com/block/v1alpha1/zones/fr-par-1/volumes/8b7d43ec-bb58-4d1b-9fd3-0fdfff049f32
159+
uri: https://api.scaleway.com/block/v1alpha1/zones/fr-par-1/volumes/6a371d9d-1edb-4c62-a49b-33852b4704d1
190160
response:
191161
body:
192-
string: '{"id": "8b7d43ec-bb58-4d1b-9fd3-0fdfff049f32", "name": "vol-sharp-hypatia",
162+
string: '{"id": "6a371d9d-1edb-4c62-a49b-33852b4704d1", "name": "vol-eloquent-merkle",
193163
"type": "sbs_5k", "size": 10000000000, "project_id": "11111111-1111-1111-1111-111111111111",
194-
"created_at": "2025-08-29T07:51:18.905485Z", "updated_at": "2025-08-29T07:51:24.314201Z",
164+
"created_at": "2025-09-02T07:48:14.738496Z", "updated_at": "2025-09-02T07:48:20.199289Z",
195165
"references": [], "parent_snapshot_id": null, "status": "available", "tags":
196-
[], "specs": {"perf_iops": 5000, "class": "sbs"}, "last_detached_at": "2025-08-29T07:51:24.314201Z",
166+
[], "specs": {"perf_iops": 5000, "class": "sbs"}, "last_detached_at": "2025-09-02T07:48:20.199289Z",
197167
"zone": "fr-par-1"}'
198168
headers:
199169
content-length:
200-
- '426'
201-
content-security-policy:
202-
- default-src 'none'; frame-ancestors 'none'
203-
content-type:
204-
- application/json
170+
- '428'
205171
date:
206-
- Fri, 29 Aug 2025 07:51:25 GMT
172+
- Tue, 02 Sep 2025 07:48:20 GMT
207173
server:
208-
- Scaleway API Gateway (fr-par-2;edge02)
209-
strict-transport-security:
210-
- max-age=63072000
211-
x-content-type-options:
212-
- nosniff
213-
x-frame-options:
214-
- DENY
174+
- Scaleway API Gateway (fr-par-3;edge02)
215175
x-request-id:
216-
- 0a220265-ed08-4001-9abc-47915cff24b4
176+
- 9043eca9-c83b-4007-8ee8-2ead8c4726ad
217177
status:
218178
code: 200
219179
message: OK
@@ -225,27 +185,17 @@ interactions:
225185
user-agent:
226186
- scaleway-sdk-python/2.0.0
227187
method: DELETE
228-
uri: https://api.scaleway.com/block/v1alpha1/zones/fr-par-1/volumes/8b7d43ec-bb58-4d1b-9fd3-0fdfff049f32
188+
uri: https://api.scaleway.com/block/v1alpha1/zones/fr-par-1/volumes/6a371d9d-1edb-4c62-a49b-33852b4704d1
229189
response:
230190
body:
231191
string: ''
232192
headers:
233-
content-security-policy:
234-
- default-src 'none'; frame-ancestors 'none'
235-
content-type:
236-
- application/json
237193
date:
238-
- Fri, 29 Aug 2025 07:51:25 GMT
194+
- Tue, 02 Sep 2025 07:48:21 GMT
239195
server:
240-
- Scaleway API Gateway (fr-par-2;edge03)
241-
strict-transport-security:
242-
- max-age=63072000
243-
x-content-type-options:
244-
- nosniff
245-
x-frame-options:
246-
- DENY
196+
- Scaleway API Gateway (fr-par-3;edge02)
247197
x-request-id:
248-
- bf5a56fe-c0bc-4a66-ba1b-7352d28d4c60
198+
- 9c48c066-1a66-4273-a887-58d34b53248d
249199
status:
250200
code: 204
251201
message: No Content
@@ -257,27 +207,17 @@ interactions:
257207
user-agent:
258208
- scaleway-sdk-python/2.0.0
259209
method: DELETE
260-
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/71a1d133-0e17-4440-b305-b4e1dca55870
210+
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/56f0c6bd-b659-4aec-b885-c408b4f9c93d
261211
response:
262212
body:
263213
string: ''
264214
headers:
265-
content-security-policy:
266-
- default-src 'none'; frame-ancestors 'none'
267-
content-type:
268-
- application/json
269215
date:
270-
- Fri, 29 Aug 2025 07:51:25 GMT
216+
- Tue, 02 Sep 2025 07:48:21 GMT
271217
server:
272-
- Scaleway API Gateway (fr-par-2;edge01)
273-
strict-transport-security:
274-
- max-age=63072000
275-
x-content-type-options:
276-
- nosniff
277-
x-frame-options:
278-
- DENY
218+
- Scaleway API Gateway (fr-par-3;edge02)
279219
x-request-id:
280-
- eea4019d-cd85-4d33-8817-1301c1dd10d2
220+
- 358f535d-2af0-4b7d-b0ff-622af22b4a07
281221
status:
282222
code: 204
283223
message: No Content

0 commit comments

Comments
 (0)