@@ -39,6 +39,8 @@ class Server(BaseDomain):
3939 User-defined labels (key-value pairs)
4040 :param volumes: List[:class:`BoundVolume <hcloud.volumes.client.BoundVolume>`]
4141 Volumes assigned to this server.
42+ :param private_net: List[:class:`PrivateNet <hcloud.servers.domain.PrivateNet`]
43+ Private networks information.
4244 """
4345 STATUS_RUNNING = "running"
4446 """Server Status running"""
@@ -76,6 +78,7 @@ class Server(BaseDomain):
7678 "protection" ,
7779 "labels" ,
7880 "volumes" ,
81+ "private_net"
7982 )
8083
8184 created = ISODateTime ()
@@ -102,6 +105,7 @@ def __init__(
102105 protection = None ,
103106 labels = None ,
104107 volumes = None ,
108+ private_net = None ,
105109 ):
106110 self .id = id
107111 self .name = name
@@ -121,6 +125,7 @@ def __init__(
121125 self .protection = protection
122126 self .labels = labels
123127 self .volumes = volumes
128+ self .private_net = private_net
124129
125130
126131class CreateServerResponse (BaseDomain ):
@@ -308,3 +313,29 @@ def __init__(self,
308313 ip_parts = self .ip .split ("/" ) # 2001:db8::/64 to 2001:db8:: and 64
309314 self .network = ip_parts [0 ]
310315 self .network_mask = ip_parts [1 ]
316+
317+
318+ class PrivateNet (BaseDomain ):
319+ """PrivateNet Domain
320+
321+ :param network: :class:`BoundNetwork <hcloud.networks.client.BoundNetwork>`
322+ The network the server is attached to
323+ :param ip: str
324+ The main IP Address of the server in the Network
325+ :param alias_ips: List[str]
326+ The alias ips for a server
327+ """
328+ __slots__ = (
329+ "network" ,
330+ "ip" ,
331+ "alias_ips"
332+ )
333+
334+ def __init__ (self ,
335+ network , # type: BoundNetwork
336+ ip , # type: str
337+ alias_ips , # type: List[str]
338+ ):
339+ self .network = network
340+ self .ip = ip
341+ self .alias_ips = alias_ips
0 commit comments