imperituroard 1.1.12 → 1.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/lib/imperituroard.rb +8 -7
- data/lib/imperituroard/add_functions/logger/any_functions.rb +1 -1
- data/lib/imperituroard/platforms/cps/cps_mongo_connector.rb +394 -0
- data/lib/imperituroard/platforms/cps/qps_connector.rb +63 -0
- data/lib/imperituroard/platforms/iwag/iwag_database_worker.rb +1 -1
- data/lib/imperituroard/platforms/iwag/iwag_telnet_connector.rb +9 -9
- data/lib/imperituroard/projects/iot.rb +12 -0
- data/lib/imperituroard/projects/iot/add_functions.rb +3 -3
- data/lib/imperituroard/projects/iot/hua_oceanconnect_adapter.rb +6 -6
- data/lib/imperituroard/projects/iot/internal_functions.rb +5 -5
- data/lib/imperituroard/projects/iot/mongoconnector.rb +25 -0
- data/lib/imperituroard/projects/mhub.rb +36 -10
- data/lib/imperituroard/projects/mhub/gms.rb +29 -29
- data/lib/imperituroard/projects/mhub/sk.rb +13 -10
- data/lib/imperituroard/projects/mhub/subs/dabrab/dabrab_platform.rb +35 -14
- data/lib/imperituroard/projects/mhub/subs/dabrab/dabrab_proced.rb +51 -31
- data/lib/imperituroard/projects/oats/fttx_acl/add_acl_fttx.rb +187 -0
- data/lib/imperituroard/projects/ukaz60/belgim.rb +3 -2
- data/lib/imperituroard/projects/ukaz60/ukaz60_add_func.rb +15 -13
- data/lib/imperituroard/projects/wttx/phpipamcps.rb +29 -28
- data/lib/imperituroard/projects/wttx/updatepostcps.rb +2 -2
- data/lib/imperituroard/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c33a43a67fc96768e51fb1a612372b67bb6d27d
|
4
|
+
data.tar.gz: 2c15329e9f493ef186d9ae0955e4d2c552bf7ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 963dc4dbffee66e2822d4a58bc2603dd4183480066beb9e7828b7426f502b28894decaf56a759d1addf0e6a1bcb0fd1960a341c35cec857772d9158807b6d0f0
|
7
|
+
data.tar.gz: 3d099c234e11fd1b2d3cc995b767225da3a27c9edaf9f6a08ff9b768099927dfc117da499c14c017de2127cfabcffe7cb4da009c13cd4fe22cd9f066b941c279
|
data/.gitignore
CHANGED
data/lib/imperituroard.rb
CHANGED
@@ -38,7 +38,7 @@ module Imperituroard
|
|
38
38
|
class Error < StandardError;
|
39
39
|
end
|
40
40
|
|
41
|
-
def initialize
|
41
|
+
def initialize
|
42
42
|
end
|
43
43
|
|
44
44
|
def hhh(jjj)
|
@@ -270,7 +270,7 @@ class Iot
|
|
270
270
|
iot_connector.set_data_replace_2(soapgw_params, real_ip, remote_ip)
|
271
271
|
end
|
272
272
|
|
273
|
-
#
|
273
|
+
#15 integration with SPA
|
274
274
|
# add imei to correct profile
|
275
275
|
def spa_service_set(soapgw_params, real_ip, remote_ip)
|
276
276
|
#imei
|
@@ -279,6 +279,7 @@ class Iot
|
|
279
279
|
#unp
|
280
280
|
#note
|
281
281
|
#descriptiot
|
282
|
+
iot_connector.spa_service_set_2(soapgw_params, real_ip, remote_ip)
|
282
283
|
end
|
283
284
|
|
284
285
|
|
@@ -322,7 +323,7 @@ class Mhub_2
|
|
322
323
|
@internal_func = InternalFunc.new
|
323
324
|
@mhub_connector = Sksk_2.new(sk_url_simple, sk_login, sk_password, sk_url_broadcast, telegram_api_url, telegram_chat_id, log_level)
|
324
325
|
@internal_func = InternalFunc.new
|
325
|
-
@dabrab_connecter = Dabrab.new
|
326
|
+
@dabrab_connecter = Dabrab.new(log_level)
|
326
327
|
@static_callback = static_callback
|
327
328
|
@crm_connector = Crm_2.new(crm_callback_url, crm_login, crm_password, telegram_api_url, telegram_chat_id, log_level)
|
328
329
|
@mhub_connector = MhubFunctions_2.new(sk_url_simple, sk_login, sk_password, telegram_api_url, telegram_chat_id, sk_url_broadcast, static_callback, crm_callback_url, crm_login, crm_password, sms_alphaname, log_level)
|
@@ -341,12 +342,12 @@ class Mhub_2
|
|
341
342
|
mhub_connector.get_send_message_2(params, ip_src, ip_real, ip_vip)
|
342
343
|
end
|
343
344
|
|
344
|
-
def get_send_message_mass(params, ip_src, ip_real, ip_vip, slice_number=100, time_pause_minutes=5)
|
345
|
-
mhub_connector.get_send_message_mass_2(params, ip_src, ip_real, ip_vip, slice_number, time_pause_minutes)
|
345
|
+
def get_send_message_mass(params, ip_src, ip_real, ip_vip, slice_number=100, time_pause_minutes=5, viberttl=60, params_manual_set=0, smsttl=60)
|
346
|
+
mhub_connector.get_send_message_mass_2(params, ip_src, ip_real, ip_vip, slice_number, time_pause_minutes, viberttl, params_manual_set, smsttl)
|
346
347
|
end
|
347
348
|
|
348
|
-
def recieve_delivery_report(params, ip_src, ip_real, ip_vip)
|
349
|
-
mhub_connector.rec_deliv_report_2(params, ip_src, ip_real, ip_vip)
|
349
|
+
def recieve_delivery_report(params, ip_src, ip_real, ip_vip, crm_slice_num)
|
350
|
+
mhub_connector.rec_deliv_report_2(params, ip_src, ip_real, ip_vip, crm_slice_num)
|
350
351
|
end
|
351
352
|
|
352
353
|
end
|
@@ -0,0 +1,394 @@
|
|
1
|
+
require 'mongo'
|
2
|
+
|
3
|
+
class MongoCPS_2
|
4
|
+
|
5
|
+
attr_accessor :mongo_ip, :mongo_port, :client, :mongo_database, :internal_func, :subs_collection
|
6
|
+
|
7
|
+
def initialize(mongo_ip, mongo_port, mongo_database)
|
8
|
+
@mongo_database = mongo_database
|
9
|
+
@mongo_ip = mongo_ip
|
10
|
+
@mongo_port = mongo_port
|
11
|
+
client_host = [mongo_ip + ":" + mongo_port]
|
12
|
+
@client = Mongo::Client.new(client_host, :database => mongo_database, :server_selection_timeout => 5)
|
13
|
+
@subs_collection = client[:subscriber]
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_minsk_fttx_fizlic
|
17
|
+
answ_res_msisdn = []
|
18
|
+
req_json = {"$and": [{"avps_key.code_key": {"$not": /IN-ACL/}}, {"credentials_key.network_id_key": {"$in": [/ Min/, /Minsk/]}}, {"$or": [{"services_key.code_key": "FR12083"}, {"services_key.code_key": "FR7967"}, {"services_key.code_key": "FR7241"}, {"services_key.code_key": "FR7242"}, {"services_key.code_key": "FR7243"}, {"services_key.code_key": "FR7244"}, {"services_key.code_key": "FR9749"}, {"services_key.code_key": "FR9750"}, {"services_key.code_key": "FR9751"}, {"services_key.code_key": "FR9752"}, {"services_key.code_key": "FR11885"}, {"services_key.code_key": "FR14994"}, {"services_key.code_key": "FR15506"}, {"services_key.code_key": "FR17303"}, {"services_key.code_key": "FR11484"}]}, {"credentials_key.network_id_key": {"$not": /375\d+VL/}}]}
|
19
|
+
subs_collection.find(req_json).each {|row|
|
20
|
+
msisdn = ""
|
21
|
+
username = ""
|
22
|
+
row['credentials_key'].each {|cred|
|
23
|
+
if cred['network_id_key'][/37500\d{7}/]
|
24
|
+
msisdn = cred['network_id_key']
|
25
|
+
else
|
26
|
+
username = cred['network_id_key']
|
27
|
+
end
|
28
|
+
}
|
29
|
+
if msisdn != '' && username != ''
|
30
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
31
|
+
end
|
32
|
+
}
|
33
|
+
answ_res_msisdn
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
def get_minsk_fttx_zone2
|
38
|
+
answ_res_msisdn = []
|
39
|
+
req_json = {'$and': [{'avps_key.code_key':
|
40
|
+
{'$not': /IN-ACL/}},
|
41
|
+
{'credentials_key.network_id_key':
|
42
|
+
{'$in':
|
43
|
+
[/Min_Nezavisimosti_164/,
|
44
|
+
/Min_Nezavisimosti_181/,
|
45
|
+
/Min_Nezavisimosti_183/,
|
46
|
+
/Min_Nezavisimosti_185/,
|
47
|
+
/Min_Nezavisimosti_42/,
|
48
|
+
/Min_Nezavisimosti_40/,
|
49
|
+
/Min_Nezavisimosti_60/,
|
50
|
+
/Min_Nezavisimosti_44/,
|
51
|
+
/Min_Nezavisimosti_52/,
|
52
|
+
/Min_Nezavisimosti_46/,
|
53
|
+
/Min_Nezavisimosti_48/,
|
54
|
+
/Min_Surganova_52/,
|
55
|
+
/Min_Surganova_64/,
|
56
|
+
/Min_Surganova_76/,
|
57
|
+
/Min_Bogdanovicha_108/,
|
58
|
+
/Min_Bogdanovicha_116/,
|
59
|
+
/Min_Bogdanovicha_114/,
|
60
|
+
/Min_Prityckogo_160/,
|
61
|
+
/Min_Kropotkina_47/,
|
62
|
+
/Storozhevskaya_8/,
|
63
|
+
/Min_Kozlova_2/,
|
64
|
+
/Min_Kozlova_4/,
|
65
|
+
/Min_Kozlova_6/,
|
66
|
+
/Min_Kozlova_5/,
|
67
|
+
/Min_Kozlova_7/,
|
68
|
+
/Min_Kozlova_9/,
|
69
|
+
/Min_Bjaduli_3/,
|
70
|
+
/Min_Bjaduli_5/,
|
71
|
+
/Min_Bjaduli_6/,
|
72
|
+
/Min_Bjaduli_8/,
|
73
|
+
/Min_Bjaduli_12/,
|
74
|
+
/Min_Pervomajskaja_15/,
|
75
|
+
/Min_Pervomajskaja_17/,
|
76
|
+
/Min_Zaharova_19/,
|
77
|
+
/Min_Zaharova_23/,
|
78
|
+
/Min_Zaharova_25/,
|
79
|
+
/Min_Zaharova_27/,
|
80
|
+
/Min_Zaharova_29/,
|
81
|
+
/Min_Zaharova_33/,
|
82
|
+
/Min_Bronevoj_12/,
|
83
|
+
/Min_Bronevoj_13/,
|
84
|
+
/Min_Vojskovoj_10/,
|
85
|
+
/Min_Vojskovoj_13/,
|
86
|
+
/Min_Vojskovoj_14/,
|
87
|
+
/Min_Vojskovoj_15/,
|
88
|
+
/Min_Rumjanceva_13/,
|
89
|
+
/Min_Rumjanceva_14/,
|
90
|
+
/Min_Rumjanceva_15/,
|
91
|
+
/Min_Rumjanceva_17/]}},
|
92
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
93
|
+
{'services_key.code_key': 'FR7967'},
|
94
|
+
{'services_key.code_key': 'FR7241'},
|
95
|
+
{'services_key.code_key': 'FR7242'},
|
96
|
+
{'services_key.code_key': 'FR7243'},
|
97
|
+
{'services_key.code_key': 'FR7244'},
|
98
|
+
{'services_key.code_key': 'FR9749'},
|
99
|
+
{'services_key.code_key': 'FR9750'},
|
100
|
+
{'services_key.code_key': 'FR9751'},
|
101
|
+
{'services_key.code_key': 'FR9752'},
|
102
|
+
{'services_key.code_key': 'FR11885'},
|
103
|
+
{'services_key.code_key': 'FR14994'},
|
104
|
+
{'services_key.code_key': 'FR15506'},
|
105
|
+
{'services_key.code_key': 'FR17303'},
|
106
|
+
{'services_key.code_key': 'FR11484'}]},
|
107
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
108
|
+
subs_collection.find(req_json).each {|row|
|
109
|
+
msisdn = ''
|
110
|
+
username = ''
|
111
|
+
row['credentials_key'].each {|cred|
|
112
|
+
if cred['network_id_key'][/37500\d{7}/]
|
113
|
+
msisdn = cred['network_id_key']
|
114
|
+
else
|
115
|
+
username = cred['network_id_key']
|
116
|
+
end
|
117
|
+
}
|
118
|
+
if msisdn != '' && username != ''
|
119
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
120
|
+
end
|
121
|
+
}
|
122
|
+
answ_res_msisdn
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
def get_minsk_fttx_zone3_rokos
|
128
|
+
answ_res_msisdn = []
|
129
|
+
req_json = {'$and': [{'avps_key.code_key':
|
130
|
+
{'$not': /IN-ACL/}},
|
131
|
+
{'credentials_key.network_id_key':
|
132
|
+
{'$in':
|
133
|
+
[/Rokossovskogo_81/]}},
|
134
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
135
|
+
{'services_key.code_key': 'FR7967'},
|
136
|
+
{'services_key.code_key': 'FR7241'},
|
137
|
+
{'services_key.code_key': 'FR7242'},
|
138
|
+
{'services_key.code_key': 'FR7243'},
|
139
|
+
{'services_key.code_key': 'FR7244'},
|
140
|
+
{'services_key.code_key': 'FR9749'},
|
141
|
+
{'services_key.code_key': 'FR9750'},
|
142
|
+
{'services_key.code_key': 'FR9751'},
|
143
|
+
{'services_key.code_key': 'FR9752'},
|
144
|
+
{'services_key.code_key': 'FR11885'},
|
145
|
+
{'services_key.code_key': 'FR14994'},
|
146
|
+
{'services_key.code_key': 'FR15506'},
|
147
|
+
{'services_key.code_key': 'FR17303'},
|
148
|
+
{'services_key.code_key': 'FR11484'}]},
|
149
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
150
|
+
subs_collection.find(req_json).each {|row|
|
151
|
+
msisdn = ''
|
152
|
+
username = ''
|
153
|
+
row['credentials_key'].each {|cred|
|
154
|
+
if cred['network_id_key'][/37500\d{7}/]
|
155
|
+
msisdn = cred['network_id_key']
|
156
|
+
else
|
157
|
+
username = cred['network_id_key']
|
158
|
+
end
|
159
|
+
}
|
160
|
+
if msisdn != '' && username != ''
|
161
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
162
|
+
end
|
163
|
+
}
|
164
|
+
answ_res_msisdn
|
165
|
+
end
|
166
|
+
|
167
|
+
|
168
|
+
def get_minsk_fttx_zone4_mega
|
169
|
+
answ_res_msisdn = []
|
170
|
+
req_json = {'$and': [{'avps_key.code_key':
|
171
|
+
{'$not': /IN-ACL/}},
|
172
|
+
{'credentials_key.network_id_key':
|
173
|
+
{'$in':
|
174
|
+
[/Min_Dzerzhinskogo_131/]}},
|
175
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
176
|
+
{'services_key.code_key': 'FR7967'},
|
177
|
+
{'services_key.code_key': 'FR7241'},
|
178
|
+
{'services_key.code_key': 'FR7242'},
|
179
|
+
{'services_key.code_key': 'FR7243'},
|
180
|
+
{'services_key.code_key': 'FR7244'},
|
181
|
+
{'services_key.code_key': 'FR9749'},
|
182
|
+
{'services_key.code_key': 'FR9750'},
|
183
|
+
{'services_key.code_key': 'FR9751'},
|
184
|
+
{'services_key.code_key': 'FR9752'},
|
185
|
+
{'services_key.code_key': 'FR11885'},
|
186
|
+
{'services_key.code_key': 'FR14994'},
|
187
|
+
{'services_key.code_key': 'FR15506'},
|
188
|
+
{'services_key.code_key': 'FR17303'},
|
189
|
+
{'services_key.code_key': 'FR11484'}]},
|
190
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
191
|
+
subs_collection.find(req_json).each {|row|
|
192
|
+
msisdn = ''
|
193
|
+
username = ''
|
194
|
+
row['credentials_key'].each {|cred|
|
195
|
+
if cred['network_id_key'][/37500\d{7}/]
|
196
|
+
msisdn = cred['network_id_key']
|
197
|
+
else
|
198
|
+
username = cred['network_id_key']
|
199
|
+
end
|
200
|
+
}
|
201
|
+
if msisdn != '' && username != ''
|
202
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
203
|
+
end
|
204
|
+
}
|
205
|
+
answ_res_msisdn
|
206
|
+
end
|
207
|
+
|
208
|
+
|
209
|
+
def get_minsk_fttx_zone5_koles
|
210
|
+
answ_res_msisdn = []
|
211
|
+
req_json = {'$and': [{'avps_key.code_key':
|
212
|
+
{'$not': /IN-ACL/}},
|
213
|
+
{'credentials_key.network_id_key':
|
214
|
+
{'$in':
|
215
|
+
[/Min_Kolesnikova_16/,
|
216
|
+
/Min_Kolesnikova_20/]}},
|
217
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
218
|
+
{'services_key.code_key': 'FR7967'},
|
219
|
+
{'services_key.code_key': 'FR7241'},
|
220
|
+
{'services_key.code_key': 'FR7242'},
|
221
|
+
{'services_key.code_key': 'FR7243'},
|
222
|
+
{'services_key.code_key': 'FR7244'},
|
223
|
+
{'services_key.code_key': 'FR9749'},
|
224
|
+
{'services_key.code_key': 'FR9750'},
|
225
|
+
{'services_key.code_key': 'FR9751'},
|
226
|
+
{'services_key.code_key': 'FR9752'},
|
227
|
+
{'services_key.code_key': 'FR11885'},
|
228
|
+
{'services_key.code_key': 'FR14994'},
|
229
|
+
{'services_key.code_key': 'FR15506'},
|
230
|
+
{'services_key.code_key': 'FR17303'},
|
231
|
+
{'services_key.code_key': 'FR11484'}]},
|
232
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
233
|
+
subs_collection.find(req_json).each {|row|
|
234
|
+
msisdn = ''
|
235
|
+
username = ''
|
236
|
+
row['credentials_key'].each {|cred|
|
237
|
+
if cred['network_id_key'][/37500\d{7}/]
|
238
|
+
msisdn = cred['network_id_key']
|
239
|
+
else
|
240
|
+
username = cred['network_id_key']
|
241
|
+
end
|
242
|
+
}
|
243
|
+
if msisdn != '' && username != ''
|
244
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
245
|
+
end
|
246
|
+
}
|
247
|
+
answ_res_msisdn
|
248
|
+
end
|
249
|
+
|
250
|
+
|
251
|
+
def get_minsk_fttx_zone6_all
|
252
|
+
answ_res_msisdn = []
|
253
|
+
req_json = {'$and': [{'avps_key.code_key':
|
254
|
+
{'$not': /IN-ACL/}},
|
255
|
+
{'credentials_key.network_id_key':
|
256
|
+
{'$in':
|
257
|
+
[/Min_Nezavisimosti_164/,
|
258
|
+
/Min_Nezavisimosti_181/,
|
259
|
+
/Min_Nezavisimosti_183/,
|
260
|
+
/Min_Nezavisimosti_185/,
|
261
|
+
/Min_Nezavisimosti_42/,
|
262
|
+
/Min_Nezavisimosti_40/,
|
263
|
+
/Min_Nezavisimosti_60/,
|
264
|
+
/Min_Nezavisimosti_44/,
|
265
|
+
/Min_Nezavisimosti_52/,
|
266
|
+
/Min_Nezavisimosti_46/,
|
267
|
+
/Min_Nezavisimosti_48/,
|
268
|
+
/Min_Surganova_52/,
|
269
|
+
/Min_Surganova_64/,
|
270
|
+
/Min_Surganova_76/,
|
271
|
+
/Min_Bogdanovicha_108/,
|
272
|
+
/Min_Bogdanovicha_116/,
|
273
|
+
/Min_Bogdanovicha_114/,
|
274
|
+
/Min_Prityckogo_160/,
|
275
|
+
/Min_Kropotkina_47/,
|
276
|
+
/Storozhevskaya_8/,
|
277
|
+
/Min_Kozlova_2/,
|
278
|
+
/Min_Kozlova_4/,
|
279
|
+
/Min_Kozlova_6/,
|
280
|
+
/Min_Kozlova_5/,
|
281
|
+
/Min_Kozlova_7/,
|
282
|
+
/Min_Kozlova_9/,
|
283
|
+
/Min_Bjaduli_3/,
|
284
|
+
/Min_Bjaduli_5/,
|
285
|
+
/Min_Bjaduli_6/,
|
286
|
+
/Min_Bjaduli_8/,
|
287
|
+
/Min_Bjaduli_12/,
|
288
|
+
/Min_Pervomajskaja_15/,
|
289
|
+
/Min_Pervomajskaja_17/,
|
290
|
+
/Min_Zaharova_19/,
|
291
|
+
/Min_Zaharova_23/,
|
292
|
+
/Min_Zaharova_25/,
|
293
|
+
/Min_Zaharova_27/,
|
294
|
+
/Min_Zaharova_29/,
|
295
|
+
/Min_Zaharova_33/,
|
296
|
+
/Min_Bronevoj_12/,
|
297
|
+
/Min_Bronevoj_13/,
|
298
|
+
/Min_Vojskovoj_10/,
|
299
|
+
/Min_Vojskovoj_13/,
|
300
|
+
/Min_Vojskovoj_14/,
|
301
|
+
/Min_Vojskovoj_15/,
|
302
|
+
/Min_Rumjanceva_13/,
|
303
|
+
/Min_Rumjanceva_14/,
|
304
|
+
/Min_Rumjanceva_15/,
|
305
|
+
/Min_Rumjanceva_17/,
|
306
|
+
/Rokossovskogo_81/,
|
307
|
+
/Min_Dzerzhinskogo_131/,
|
308
|
+
/Min_Kolesnikova_16/,
|
309
|
+
/Min_Kolesnikova_20/]}},
|
310
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
311
|
+
{'services_key.code_key': 'FR7967'},
|
312
|
+
{'services_key.code_key': 'FR7241'},
|
313
|
+
{'services_key.code_key': 'FR7242'},
|
314
|
+
{'services_key.code_key': 'FR7243'},
|
315
|
+
{'services_key.code_key': 'FR7244'},
|
316
|
+
{'services_key.code_key': 'FR9749'},
|
317
|
+
{'services_key.code_key': 'FR9750'},
|
318
|
+
{'services_key.code_key': 'FR9751'},
|
319
|
+
{'services_key.code_key': 'FR9752'},
|
320
|
+
{'services_key.code_key': 'FR11885'},
|
321
|
+
{'services_key.code_key': 'FR14994'},
|
322
|
+
{'services_key.code_key': 'FR15506'},
|
323
|
+
{'services_key.code_key': 'FR17303'},
|
324
|
+
{'services_key.code_key': 'FR11484'}]},
|
325
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
326
|
+
subs_collection.find(req_json).each {|row|
|
327
|
+
msisdn = ''
|
328
|
+
username = ''
|
329
|
+
row['credentials_key'].each {|cred|
|
330
|
+
if cred['network_id_key'][/37500\d{7}/]
|
331
|
+
msisdn = cred['network_id_key']
|
332
|
+
else
|
333
|
+
username = cred['network_id_key']
|
334
|
+
end
|
335
|
+
}
|
336
|
+
if msisdn != '' && username != ''
|
337
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
338
|
+
end
|
339
|
+
}
|
340
|
+
answ_res_msisdn
|
341
|
+
end
|
342
|
+
|
343
|
+
|
344
|
+
def get_minsk_fttx_zone7_3last
|
345
|
+
answ_res_msisdn = []
|
346
|
+
req_json = {'$and': [{'avps_key.code_key':
|
347
|
+
{'$not': /IN-ACL/}},
|
348
|
+
{'credentials_key.network_id_key':
|
349
|
+
{'$in':
|
350
|
+
[/Rokossovskogo_81/,
|
351
|
+
/Min_Dzerzhinskogo_131/,
|
352
|
+
/Min_Kolesnikova_16/,
|
353
|
+
/Min_Kolesnikova_20/]}},
|
354
|
+
{'$or': [{'services_key.code_key': 'FR12083'},
|
355
|
+
{'services_key.code_key': 'FR7967'},
|
356
|
+
{'services_key.code_key': 'FR7241'},
|
357
|
+
{'services_key.code_key': 'FR7242'},
|
358
|
+
{'services_key.code_key': 'FR7243'},
|
359
|
+
{'services_key.code_key': 'FR7244'},
|
360
|
+
{'services_key.code_key': 'FR9749'},
|
361
|
+
{'services_key.code_key': 'FR9750'},
|
362
|
+
{'services_key.code_key': 'FR9751'},
|
363
|
+
{'services_key.code_key': 'FR9752'},
|
364
|
+
{'services_key.code_key': 'FR11885'},
|
365
|
+
{'services_key.code_key': 'FR14994'},
|
366
|
+
{'services_key.code_key': 'FR15506'},
|
367
|
+
{'services_key.code_key': 'FR17303'},
|
368
|
+
{'services_key.code_key': 'FR11484'}]},
|
369
|
+
{'credentials_key.network_id_key': {'$not': /375\d+VL/}}]}
|
370
|
+
subs_collection.find(req_json).each {|row|
|
371
|
+
msisdn = ''
|
372
|
+
username = ''
|
373
|
+
row['credentials_key'].each {|cred|
|
374
|
+
if cred['network_id_key'][/37500\d{7}/]
|
375
|
+
msisdn = cred['network_id_key']
|
376
|
+
else
|
377
|
+
username = cred['network_id_key']
|
378
|
+
end
|
379
|
+
}
|
380
|
+
if msisdn != '' && username != ''
|
381
|
+
answ_res_msisdn.push(msisdn + ';' + username)
|
382
|
+
end
|
383
|
+
}
|
384
|
+
answ_res_msisdn
|
385
|
+
end
|
386
|
+
|
387
|
+
def test
|
388
|
+
subs_collection.find({'credentials_key.network_id_key': '375001120416'}).each {|row|
|
389
|
+
p row
|
390
|
+
}
|
391
|
+
p 'ee'
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|