@@ -34,10 +34,6 @@ def ic_port(self):
34
34
def sqs_port (self ):
35
35
pass
36
36
37
- @abc .abstractproperty
38
- def ext_port (self ):
39
- pass
40
-
41
37
@abc .abstractproperty
42
38
def public_http_port (self ):
43
39
pass
@@ -122,12 +118,6 @@ def sqs_port(self):
122
118
self .__sqs_port = self .__port_manager .get_port ()
123
119
return self .__sqs_port
124
120
125
- @property
126
- def ext_port (self ):
127
- if self .__ext_port is None :
128
- self .__ext_port = self .__port_manager .get_port ()
129
- return self .__ext_port
130
-
131
121
@property
132
122
def pgwire_port (self ):
133
123
if self .__pgwire_port is None :
@@ -169,40 +159,18 @@ def release_ports(self):
169
159
class KikimrFixedNodePortAllocator (KikimrNodePortAllocatorInterface ):
170
160
171
161
def __init__ (self , base_port_offset , mon_port = 8765 , grpc_port = 2135 , mbus_port = 2134 , ic_port = 19001 , sqs_port = 8771 , grpc_ssl_port = 2137 ,
172
- ext_port = 2237 , public_http_port = 8766 , pgwire_port = 5432 ):
162
+ public_http_port = 8766 , pgwire_port = 5432 ):
173
163
super (KikimrFixedNodePortAllocator , self ).__init__ ()
174
164
175
165
self .base_port_offset = base_port_offset
176
- if os .getenv ('MON_PORT' ) is not None :
177
- self .__mon_port = int (os .getenv ('MON_PORT' ))
178
- else :
179
- self .__mon_port = mon_port
180
- if os .getenv ('GRPC_PORT' ) is not None :
181
- self .__grpc_port = int (os .getenv ('GRPC_PORT' ))
182
- else :
183
- self .__grpc_port = grpc_port
166
+ self .__mon_port = int (os .getenv ('MON_PORT' , mon_port ))
167
+ self .__grpc_port = int (os .getenv ('GRPC_PORT' , grpc_port ))
184
168
self .__mbus_port = mbus_port
185
- if os .getenv ('IC_PORT' ) is not None :
186
- self .__ic_port = int (os .getenv ('IC_PORT' ))
187
- else :
188
- self .__ic_port = ic_port
169
+ self .__ic_port = int (os .getenv ('IC_PORT' , ic_port ))
189
170
self .__sqs_port = sqs_port
190
- if os .getenv ('GRPC_TLS_PORT' ) is not None :
191
- self .__grpc_ssl_port = int (os .getenv ('GRPC_TLS_PORT' ))
192
- else :
193
- self .__grpc_ssl_port = grpc_ssl_port
194
- if os .getenv ('GRPC_EXT_PORT' ) is not None :
195
- self .__ext_port = int (os .getenv ('GRPC_EXT_PORT' ))
196
- else :
197
- self .__ext_port = ext_port
198
- if os .getenv ('PUBLIC_HTTP_PORT' ) is not None :
199
- self .__public_http_port = int (os .getenv ('PUBLIC_HTTP_PORT' ))
200
- else :
201
- self .__public_http_port = public_http_port
202
- if os .getenv ('YDB_PGWIRE_PORT' ) is not None :
203
- self .__pgwire_port = int (os .getenv ('YDB_PGWIRE_PORT' ))
204
- else :
205
- self .__pgwire_port = pgwire_port
171
+ self .__grpc_ssl_port = int (os .getenv ('GRPC_TLS_PORT' , grpc_ssl_port ))
172
+ self .__public_http_port = int (os .getenv ('PUBLIC_HTTP_PORT' , public_http_port ))
173
+ self .__pgwire_port = int (os .getenv ('YDB_PGWIRE_PORT' , pgwire_port ))
206
174
207
175
@property
208
176
def mon_port (self ):
@@ -229,9 +197,6 @@ def sqs_port(self):
229
197
return self .__sqs_port + self .base_port_offset
230
198
231
199
@property
232
- def ext_port (self ):
233
- return self .__ext_port + self .base_port_offset
234
-
235
200
def public_http_port (self ):
236
201
return self .__public_http_port + self .base_port_offset
237
202
@@ -242,25 +207,15 @@ def pgwire_port(self):
242
207
243
208
class KikimrFixedPortAllocator (KikimrPortAllocatorInterface ):
244
209
def __init__ (self ,
245
- base_port_offset ,
246
- nodes_port_allocators_list = (),
247
- slots_port_allocators_list = ()):
210
+ base_port_offset ):
248
211
super (KikimrFixedPortAllocator , self ).__init__ ()
249
- self .__nodes_port_allocators_list = nodes_port_allocators_list
250
- self .__slots_port_allocators_list = slots_port_allocators_list
251
212
self .__default_value = KikimrFixedNodePortAllocator (base_port_offset )
252
213
253
214
def get_node_port_allocator (self , node_index ):
254
- if node_index <= len (self .__nodes_port_allocators_list ):
255
- return self .__nodes_port_allocators_list [node_index - 1 ]
256
- else :
257
- return self .__default_value
215
+ return self .__default_value
258
216
259
217
def get_slot_port_allocator (self , slot_index ):
260
- if slot_index <= len (self .__slots_port_allocators_list ):
261
- return self .__slots_port_allocators_list [slot_index - 1 ]
262
- else :
263
- return self .__default_value
218
+ return self .__default_value
264
219
265
220
def release_ports (self ):
266
221
pass
0 commit comments