@@ -28,25 +28,25 @@ class Server(BaseDomain):
2828 created = ISODateTime ()
2929
3030 def __init__ (
31- self ,
32- id ,
33- name = None ,
34- status = None ,
35- created = None ,
36- public_net = None ,
37- server_type = None ,
38- datacenter = None ,
39- image = None ,
40- iso = None ,
41- rescue_enabled = None ,
42- locked = None ,
43- backup_window = None ,
44- outgoing_traffic = None ,
45- ingoing_traffic = None ,
46- included_traffic = None ,
47- protection = None ,
48- labels = None ,
49- volumes = None ,
31+ self ,
32+ id ,
33+ name = None ,
34+ status = None ,
35+ created = None ,
36+ public_net = None ,
37+ server_type = None ,
38+ datacenter = None ,
39+ image = None ,
40+ iso = None ,
41+ rescue_enabled = None ,
42+ locked = None ,
43+ backup_window = None ,
44+ outgoing_traffic = None ,
45+ ingoing_traffic = None ,
46+ included_traffic = None ,
47+ protection = None ,
48+ labels = None ,
49+ volumes = None ,
5050 ):
5151 self .id = id
5252 self .name = name
@@ -78,10 +78,10 @@ class CreateServerResponse(BaseDomain):
7878
7979 def __init__ (
8080 self ,
81- server , # type: BoundServer
82- action , # type: BoundAction
83- next_actions , # type: List[Action]
84- root_password # type: str
81+ server , # type: BoundServer
82+ action , # type: BoundAction
83+ next_actions , # type: List[Action]
84+ root_password # type: str
8585 ):
8686 self .server = server
8787 self .action = action
@@ -97,8 +97,8 @@ class ResetPasswordResponse(BaseDomain):
9797
9898 def __init__ (
9999 self ,
100- action , # type: BoundAction
101- root_password # type: str
100+ action , # type: BoundAction
101+ root_password # type: str
102102 ):
103103 self .action = action
104104 self .root_password = root_password
@@ -112,8 +112,8 @@ class EnableRescueResponse(BaseDomain):
112112
113113 def __init__ (
114114 self ,
115- action , # type: BoundAction
116- root_password # type: str
115+ action , # type: BoundAction
116+ root_password # type: str
117117 ):
118118 self .action = action
119119 self .root_password = root_password
@@ -128,10 +128,66 @@ class RequestConsoleResponse(BaseDomain):
128128
129129 def __init__ (
130130 self ,
131- action , # type: BoundAction
132- wss_url , # type: str
133- password , # type: str
131+ action , # type: BoundAction
132+ wss_url , # type: str
133+ password , # type: str
134134 ):
135135 self .action = action
136136 self .wss_url = wss_url
137137 self .password = password
138+
139+
140+ class PublicNetwork (BaseDomain ):
141+ __slots__ = (
142+ "ipv4" ,
143+ "ipv6" ,
144+ "floating_ips"
145+ )
146+
147+ def __init__ (self ,
148+ ipv4 , # type: IPv4Address
149+ ipv6 , # type: IPv6Network
150+ floating_ips , # type: List[BoundFloatingIP]
151+ ):
152+ self .ipv4 = ipv4
153+ self .ipv6 = ipv6
154+ self .floating_ips = floating_ips
155+
156+
157+ class IPv4Address (BaseDomain ):
158+ __slots__ = (
159+ "ip" ,
160+ "blocked" ,
161+ "dns_ptr"
162+ )
163+
164+ def __init__ (self ,
165+ ip , # type: str
166+ blocked , # type: bool
167+ dns_ptr , # type: str
168+ ):
169+ self .ip = ip
170+ self .blocked = blocked
171+ self .dns_ptr = dns_ptr
172+
173+
174+ class IPv6Network (BaseDomain ):
175+ __slots__ = (
176+ "ip" ,
177+ "blocked" ,
178+ "dns_ptr" ,
179+ "network" ,
180+ "network_mask"
181+ )
182+
183+ def __init__ (self ,
184+ ip , # type: str
185+ blocked , # type: bool
186+ dns_ptr , # type: list
187+ ):
188+ self .ip = ip
189+ self .blocked = blocked
190+ self .dns_ptr = dns_ptr
191+ ip_parts = self .ip .split ("/" ) # 2001:db8::/64 to 2001:db8:: and 64
192+ self .network = ip_parts [0 ]
193+ self .network_mask = ip_parts [1 ]
0 commit comments