Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions scaleway/scaleway/instance/v1/tests/cassettes/server.cassette.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
interactions:
- request:
body: '{"project": "11111111-1111-1111-1111-111111111111", "commercial_type":
"DEV1-S", "name": "test-sdk-python-fixture", "dynamic_ip_required": false, "image":
"c00ae53c-1e29-4087-a384-47f3c5c1cd84", "protected": false, "boot_type": "local"}'
headers:
Content-Length:
- '236'
user-agent:
- scaleway-sdk-python/2.0.0
method: POST
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers
response:
body:
string: '{"server": {"id": "66a3b25b-4518-43c3-9e61-33b82873d617", "name": "test-sdk-python-fixture",
"arch": "x86_64", "commercial_type": "DEV1-S", "boot_type": "local", "organization":
"11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
"hostname": "test-sdk-python-fixture", "image": {"id": "c00ae53c-1e29-4087-a384-47f3c5c1cd84",
"name": "Ubuntu 20.04 Focal Fossa", "organization": "11111111-1111-1111-1111-111111111111",
"project": "11111111-1111-1111-1111-111111111111", "root_volume": {"id": "6644dfd6-0731-45cc-a581-62f561eff7bf",
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "size": 10000000000},
"extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2025-02-03T13:36:50.774356+00:00",
"modification_date": "2025-02-03T13:36:50.774356+00:00", "default_bootscript":
null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"},
"volumes": {"0": {"boot": false, "id": "bda6aff6-7ca2-41de-a3fb-47be986c5c0a",
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri":
null, "organization": "11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
"server": {"id": "66a3b25b-4518-43c3-9e61-33b82873d617", "name": "test-sdk-python-fixture"},
"size": 20000000000, "state": "available", "creation_date": "2025-09-16T17:38:27.303680+00:00",
"modification_date": "2025-09-16T17:38:27.303680+00:00", "tags": [], "zone":
"fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail":
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c8:be:d7",
"routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required":
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-09-16T17:38:27.303680+00:00",
"modification_date": "2025-09-16T17:38:27.303680+00:00", "bootscript": null,
"security_group": {"id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default
security group"}, "location": null, "maintenances": [], "allowed_actions":
["poweron", "backup"], "placement_group": null, "private_nics": [], "zone":
"fr-par-1", "filesystems": [], "end_of_service": false}}'
headers:
content-length:
- '2163'
date:
- Tue, 16 Sep 2025 17:38:27 GMT
location:
- https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- cf1425a5-4c54-464b-bfa3-b175537ec160
status:
code: 201
message: Created
- request:
body: '{}'
headers:
Content-Length:
- '2'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617
response:
body:
string: '{"server": {"id": "66a3b25b-4518-43c3-9e61-33b82873d617", "name": "test-sdk-python-fixture",
"arch": "x86_64", "commercial_type": "DEV1-S", "boot_type": "local", "organization":
"11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
"hostname": "test-sdk-python-fixture", "image": {"id": "c00ae53c-1e29-4087-a384-47f3c5c1cd84",
"name": "Ubuntu 20.04 Focal Fossa", "organization": "11111111-1111-1111-1111-111111111111",
"project": "11111111-1111-1111-1111-111111111111", "root_volume": {"id": "6644dfd6-0731-45cc-a581-62f561eff7bf",
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "size": 10000000000},
"extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2025-02-03T13:36:50.774356+00:00",
"modification_date": "2025-02-03T13:36:50.774356+00:00", "default_bootscript":
null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"},
"volumes": {"0": {"boot": false, "id": "bda6aff6-7ca2-41de-a3fb-47be986c5c0a",
"name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri":
null, "organization": "11111111-1111-1111-1111-111111111111", "project": "11111111-1111-1111-1111-111111111111",
"server": {"id": "66a3b25b-4518-43c3-9e61-33b82873d617", "name": "test-sdk-python-fixture"},
"size": 20000000000, "state": "available", "creation_date": "2025-09-16T17:38:27.303680+00:00",
"modification_date": "2025-09-16T17:38:27.303680+00:00", "tags": [], "zone":
"fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail":
"", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:c8:be:d7",
"routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required":
false, "enable_ipv6": false, "private_ip": null, "creation_date": "2025-09-16T17:38:27.303680+00:00",
"modification_date": "2025-09-16T17:38:27.303680+00:00", "bootscript": null,
"security_group": {"id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default
security group"}, "location": null, "maintenances": [], "allowed_actions":
["poweron", "backup"], "placement_group": null, "private_nics": [], "zone":
"fr-par-1", "filesystems": [], "end_of_service": false}}'
headers:
content-length:
- '2163'
date:
- Tue, 16 Sep 2025 17:38:30 GMT
server:
- Scaleway API Gateway (fr-par-2;edge03)
x-request-id:
- b5cdd266-e8db-4235-9191-80b4fe13dc4b
status:
code: 200
message: OK
- request:
body: '{}'
headers:
Content-Length:
- '2'
user-agent:
- scaleway-sdk-python/2.0.0
method: DELETE
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617
response:
body:
string: ''
headers:
date:
- Tue, 16 Sep 2025 17:38:47 GMT
server:
- Scaleway API Gateway (fr-par-2;edge01)
x-request-id:
- c35b3c38-2ac3-448a-96ce-df5674242d5f
status:
code: 204
message: No Content
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
interactions:
- request:
body: '{}'
headers:
Content-Length:
- '2'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data
response:
body:
string: '{"user_data": ["first key"]}'
headers:
content-length:
- '28'
date:
- Tue, 16 Sep 2025 17:38:36 GMT
server:
- Scaleway API Gateway (fr-par-2;edge01)
x-request-id:
- da763635-45c0-4081-9b22-61db87a4f0a5
status:
code: 200
message: OK
- request:
body: test content
headers:
Content-Length:
- '12'
user-agent:
- scaleway-sdk-python/2.0.0
method: PATCH
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/second%20key
response:
body:
string: ''
headers:
date:
- Tue, 16 Sep 2025 17:38:37 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- db1aacee-4d93-4447-aaa2-562df54e2440
status:
code: 204
message: No Content
- request:
body: another content to test
headers:
Content-Length:
- '23'
user-agent:
- scaleway-sdk-python/2.0.0
method: PATCH
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/third%20key
response:
body:
string: ''
headers:
date:
- Tue, 16 Sep 2025 17:38:37 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 374243f1-1d2d-4847-894a-40bfdfdc58d9
status:
code: 204
message: No Content
- request:
body: content first key
headers:
Content-Length:
- '17'
user-agent:
- scaleway-sdk-python/2.0.0
method: PATCH
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key
response:
body:
string: ''
headers:
date:
- Tue, 16 Sep 2025 17:38:39 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- b4a6bb3a-6c01-4f30-8cf1-4d3d2a3e25d4
status:
code: 204
message: No Content
- request:
body: '{}'
headers:
Content-Length:
- '2'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data
response:
body:
string: '{"user_data": ["first key", "second key", "third key"]}'
headers:
content-length:
- '55'
date:
- Tue, 16 Sep 2025 17:38:40 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 6bac81f0-cce6-40a6-a55e-5a920ca5aec3
status:
code: 200
message: OK
- request:
body: '{"server_id": "66a3b25b-4518-43c3-9e61-33b82873d617", "key": "first key"}'
headers:
Content-Length:
- '73'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key
response:
body:
string: content first key
headers:
content-length:
- '17'
date:
- Tue, 16 Sep 2025 17:38:41 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 3b2ad45d-108a-4867-8ea3-5c81546f7696
status:
code: 200
message: OK
- request:
body: '{"server_id": "66a3b25b-4518-43c3-9e61-33b82873d617", "key": "second key"}'
headers:
Content-Length:
- '74'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/second%20key
response:
body:
string: test content
headers:
content-length:
- '12'
date:
- Tue, 16 Sep 2025 17:38:42 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 71c301ad-28df-47d2-9c93-b76e064202f9
status:
code: 200
message: OK
- request:
body: '{"server_id": "66a3b25b-4518-43c3-9e61-33b82873d617", "key": "third key"}'
headers:
Content-Length:
- '73'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/third%20key
response:
body:
string: another content to test
headers:
content-length:
- '23'
date:
- Tue, 16 Sep 2025 17:38:44 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 557a41e4-4b5c-4f8d-95ca-fef7ba6c200c
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
interactions:
- request:
body: this-is-a-test
headers:
Content-Length:
- '14'
user-agent:
- scaleway-sdk-python/2.0.0
method: PATCH
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key
response:
body:
string: ''
headers:
date:
- Tue, 16 Sep 2025 17:38:32 GMT
server:
- Scaleway API Gateway (fr-par-2;edge01)
x-request-id:
- 0ed3c2da-9914-462b-b123-f0bd05e159e2
status:
code: 204
message: No Content
- request:
body: '{"server_id": "66a3b25b-4518-43c3-9e61-33b82873d617", "key": "first key"}'
headers:
Content-Length:
- '73'
user-agent:
- scaleway-sdk-python/2.0.0
method: GET
uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key
response:
body:
string: this-is-a-test
headers:
content-length:
- '14'
date:
- Tue, 16 Sep 2025 17:38:33 GMT
server:
- Scaleway API Gateway (fr-par-2;edge02)
x-request-id:
- 553413c2-2def-401d-be92-3c7e7476d070
status:
code: 200
message: OK
version: 1
Loading