imperituroard 1.1.17 → 1.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 015a5d3136b3e47eab433636dd7b9e0fc4b70fdb
4
- data.tar.gz: 90d1189ffd4fdcb5a2458dda0752d5e0b10342c7
3
+ metadata.gz: a0166900baf2324e08b035c206b8fef7514232ea
4
+ data.tar.gz: 2d46c27703e78182e3cf5f899e52019dfdf530e5
5
5
  SHA512:
6
- metadata.gz: e55cf9eafb144b4426c61ef65f72d715b8240195af65b173ec09d350a6dead6bff75a9487d8e519ff2ed7dd68047ebffa91f29c54595c37cf03cdd9e7be6a995
7
- data.tar.gz: 6df5079662a650f243107f6bc4a22da04054097f4211c514833c349ace9d4312cec8c2c9df9b3f13f7b3f76f03c61ecdf4e074c81e349361a44cef246a32f233
6
+ metadata.gz: 2da390b28d9a8d33004e14a4e41bdd3a438bee5da0a047bd5fd0cc23a6a760d7be1e108fbae860cc3802f03dc7cbe836dd3c34d619aef276d85d5e5538aca8e3
7
+ data.tar.gz: ff2719e0c2343c58db52d997afcc2672e5c8cacb36c8c19b6595c1c509028298d091087257229c4d2bb61d2a75368df881e037ae62d5c119e51b5304b92ca3a7
data/.gitignore CHANGED
@@ -69,3 +69,6 @@ fabric.properties
69
69
 
70
70
  # Android studio 3.1+ serialized cache file
71
71
  .idea/caches/build_file_checksums.ser
72
+
73
+
74
+ test/
@@ -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,15 +270,16 @@ class Iot
270
270
  iot_connector.set_data_replace_2(soapgw_params, real_ip, remote_ip)
271
271
  end
272
272
 
273
- #14 integration with SPA
273
+ #15 integration with SPA
274
274
  # add imei to correct profile
275
- def spa_service_set(soapgw_params, real_ip, remote_ip)
275
+ def sdk_spa_service_set(soapgw_params, real_ip, remote_ip)
276
276
  #imei
277
277
  #imsi
278
278
  #msisdn
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
 
@@ -7,7 +7,7 @@ require 'date'
7
7
  class LogAddFunctions_2
8
8
 
9
9
 
10
- def datetimenow()
10
+ def datetimenow
11
11
  d_curr = DateTime.now
12
12
  time_zone = 'Europe/Minsk'
13
13
  DateTime.now.to_s
@@ -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
+