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
5 changes: 5 additions & 0 deletions hcloud/server_types/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ServerType(BaseDomain, DomainIdentityMixin):
Unique identifier of the server type
:param description: str
Description of the server type
:param category: str
Category of the Server Type.
:param cores: int
Number of cpu cores a server of this type will have
:param memory: int
Expand Down Expand Up @@ -42,6 +44,7 @@ class ServerType(BaseDomain, DomainIdentityMixin):
"id",
"name",
"description",
"category",
"cores",
"memory",
"disk",
Expand All @@ -66,6 +69,7 @@ def __init__(
id: int | None = None,
name: str | None = None,
description: str | None = None,
category: str | None = None,
cores: int | None = None,
memory: int | None = None,
disk: int | None = None,
Expand All @@ -80,6 +84,7 @@ def __init__(
self.id = id
self.name = name
self.description = description
self.category = category
self.cores = cores
self.memory = memory
self.disk = disk
Expand Down
1 change: 1 addition & 0 deletions tests/unit/server_types/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def server_type_response():
"id": 1,
"name": "cx11",
"description": "CX11",
"category": "Shared vCPU",
"cores": 1,
"memory": 1,
"disk": 25,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/server_types/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def test_bound_server_type_init(self, server_type_response):
assert bound_server_type.id == 1
assert bound_server_type.name == "cx11"
assert bound_server_type.description == "CX11"
assert bound_server_type.category == "Shared vCPU"
assert bound_server_type.cores == 1
assert bound_server_type.memory == 1
assert bound_server_type.disk == 25
Expand Down