From 12c05ddd92295f4ae300de84aceb71aa7796773f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Tue, 28 Oct 2025 09:43:57 +0100 Subject: [PATCH] docs: update deprecated server types The CX Gen 2 and CPX Gen 1 types are deprecated and will be removed from the API at the end of the year. This replaces all usages in our docs so users do not have to figure it out themselves. I kept the existing unit tests. --- README.md | 2 +- examples/create_server.py | 2 +- examples/get_server_metrics.py | 2 +- examples/usage_oop.py | 4 ++-- examples/usage_procedurale.py | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 07666cbd..18876469 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ client = Client(token="{YOUR_API_TOKEN}") # Please paste your API token here # Create a server named my-server response = client.servers.create( name="my-server", - server_type=ServerType(name="cx22"), + server_type=ServerType(name="cx23"), image=Image(name="ubuntu-22.04"), ) server = response.server diff --git a/examples/create_server.py b/examples/create_server.py index 81266caf..b9b7399c 100644 --- a/examples/create_server.py +++ b/examples/create_server.py @@ -15,7 +15,7 @@ response = client.servers.create( name="my-server", - server_type=ServerType(name="cx22"), + server_type=ServerType(name="cx23"), image=Image(name="ubuntu-24.04"), ) server = response.server diff --git a/examples/get_server_metrics.py b/examples/get_server_metrics.py index 55f6b9ab..c3023e31 100644 --- a/examples/get_server_metrics.py +++ b/examples/get_server_metrics.py @@ -18,7 +18,7 @@ if server is None: response = client.servers.create( name="my-server", - server_type=ServerType(name="cx22"), + server_type=ServerType(name="cx23"), image=Image(name="ubuntu-24.04"), ) server = response.server diff --git a/examples/usage_oop.py b/examples/usage_oop.py index 8749da47..4b677886 100644 --- a/examples/usage_oop.py +++ b/examples/usage_oop.py @@ -17,11 +17,11 @@ # Create 2 servers # Create 2 servers response1 = client.servers.create( - "Server1", server_type=ServerType(name="cx22"), image=Image(id=4711) + "Server1", server_type=ServerType(name="cx23"), image=Image(id=4711) ) response2 = client.servers.create( - "Server2", server_type=ServerType(name="cx22"), image=Image(id=4711) + "Server2", server_type=ServerType(name="cx23"), image=Image(id=4711) ) # Get all servers server1 = response1.server diff --git a/examples/usage_procedurale.py b/examples/usage_procedurale.py index 228f6821..50d853ba 100644 --- a/examples/usage_procedurale.py +++ b/examples/usage_procedurale.py @@ -17,11 +17,11 @@ # Create 2 servers response1 = client.servers.create( - name="Server1", server_type=ServerType(name="cx22"), image=Image(id=4711) + name="Server1", server_type=ServerType(name="cx23"), image=Image(id=4711) ) response2 = client.servers.create( - "Server2", server_type=ServerType(name="cx22"), image=Image(id=4711) + "Server2", server_type=ServerType(name="cx23"), image=Image(id=4711) ) server1 = response1.server @@ -64,7 +64,7 @@ # Create one more server and attach 2 volumes to it client.servers.create( "Server3", - server_type=ServerType(name="cx22"), + server_type=ServerType(name="cx23"), image=Image(id=4711), volumes=[Volume(id=221), Volume(id=222)], )