Skip to content

Commit

Permalink
chore: replace deprecated server type with cx22 (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola authored Jun 11, 2024
1 parent 0ce5fbc commit ed3d728
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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="cx11"),
server_type=ServerType(name="cx22"),
image=Image(name="ubuntu-22.04"),
)
server = response.server
Expand Down
4 changes: 2 additions & 2 deletions examples/create_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

response = client.servers.create(
name="my-server",
server_type=ServerType(name="cx11"),
image=Image(name="ubuntu-20.04"),
server_type=ServerType(name="cx22"),
image=Image(name="ubuntu-24.04"),
)
server = response.server
print(server)
Expand Down
4 changes: 2 additions & 2 deletions examples/get_server_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
if server is None:
response = client.servers.create(
name="my-server",
server_type=ServerType("cx11"),
image=Image(name="ubuntu-22.04"),
server_type=ServerType(name="cx22"),
image=Image(name="ubuntu-24.04"),
)
server = response.server

Expand Down
4 changes: 2 additions & 2 deletions examples/usage_oop.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# Create 2 servers
# Create 2 servers
response1 = client.servers.create(
"Server1", server_type=ServerType(name="cx11"), image=Image(id=4711)
"Server1", server_type=ServerType(name="cx22"), image=Image(id=4711)
)

response2 = client.servers.create(
"Server2", server_type=ServerType(name="cx11"), image=Image(id=4711)
"Server2", server_type=ServerType(name="cx22"), image=Image(id=4711)
)
# Get all servers
server1 = response1.server
Expand Down
6 changes: 3 additions & 3 deletions examples/usage_procedurale.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

# Create 2 servers
response1 = client.servers.create(
name="Server1", server_type=ServerType(name="cx11"), image=Image(id=4711)
name="Server1", server_type=ServerType(name="cx22"), image=Image(id=4711)
)

response2 = client.servers.create(
"Server2", server_type=ServerType(name="cx11"), image=Image(id=4711)
"Server2", server_type=ServerType(name="cx22"), image=Image(id=4711)
)

server1 = response1.server
Expand Down Expand Up @@ -64,7 +64,7 @@
# Create one more server and attach 2 volumes to it
client.servers.create(
"Server3",
server_type=ServerType(name="cx11"),
server_type=ServerType(name="cx22"),
image=Image(id=4711),
volumes=[Volume(id=221), Volume(id=222)],
)

0 comments on commit ed3d728

Please sign in to comment.