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
@@ -5,7 +5,7 @@ require 'savon'
|
|
5
5
|
|
6
6
|
|
7
7
|
class Pcps
|
8
|
-
attr_accessor :wsdl, :endpoint, :namespace, :
|
8
|
+
attr_accessor :wsdl, :endpoint, :namespace, :client_cps
|
9
9
|
|
10
10
|
def initialize(wsdl, endpoint, namespace)
|
11
11
|
@wsdl = wsdl
|
@@ -24,34 +24,35 @@ class Pcps
|
|
24
24
|
def avp_attr_list(username)
|
25
25
|
|
26
26
|
message2 = {:networkId => username}
|
27
|
-
response =
|
27
|
+
response = client_cps.call(:get_subscriber) do
|
28
28
|
message(message2)
|
29
29
|
end
|
30
30
|
aaa = response.to_hash[:get_subscriber_response][:subscriber][:avp]
|
31
31
|
#li = {"FRAMED-IP-ADDRESS":0,"FRAMED-NETMASK":0,"Default-Gateway":0,"VRF-ID":0,"DHCP-CLASS":0,"IPV4-UNNUMB":0,"PREFIX":0}
|
32
|
-
li = {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
32
|
+
li = {'FRAMED-IP-ADDRESS' => 0,
|
33
|
+
'FRAMED-NETMASK' => 0,
|
34
|
+
'Default-Gateway' => 0,
|
35
|
+
'VRF-ID' => 0,
|
36
|
+
'DHCP-CLASS' => 0,
|
37
|
+
'IPV4-UNNUMB' => 0,
|
38
|
+
'FRAMED-ROUTE-1' => 0}
|
39
|
+
is_hash = !aaa.is_a?(Hash)
|
40
|
+
if is_hash
|
41
|
+
aaa.each do |i|
|
42
|
+
if i[:code]=='FRAMED-IP-ADDRESS'
|
43
|
+
li['FRAMED-IP-ADDRESS']=1
|
44
|
+
elsif i[:code]=='FRAMED-NETMASK'
|
45
|
+
li['FRAMED-NETMASK']=1
|
46
|
+
elsif i[:code]=='Default-Gateway'
|
47
|
+
li['Default-Gateway']=1
|
48
|
+
elsif i[:code]=='VRF-ID'
|
49
|
+
li['VRF-ID']=1
|
50
|
+
elsif i[:code]=='DHCP-CLASS'
|
51
|
+
li['DHCP-CLASS']=1
|
52
|
+
elsif i[:code]=='IPV4-UNNUMB'
|
53
|
+
li['IPV4-UNNUMB']=1
|
54
|
+
elsif i[:code]=='FRAMED-ROUTE-1'
|
55
|
+
li['FRAMED-ROUTE-1']=1
|
55
56
|
end
|
56
57
|
end
|
57
58
|
end
|
@@ -81,7 +82,7 @@ class Pcps
|
|
81
82
|
# {:code => "PREFIX"}
|
82
83
|
]
|
83
84
|
}
|
84
|
-
response =
|
85
|
+
response = client_cps.call(:change_subscriber_avps) do
|
85
86
|
message(message2)
|
86
87
|
end
|
87
88
|
response
|
@@ -98,7 +99,7 @@ class Pcps
|
|
98
99
|
|
99
100
|
def get_current_attributes(msisdn)
|
100
101
|
message2 = {:networkId => msisdn}
|
101
|
-
response =
|
102
|
+
response = client_cps.call(:get_subscriber) do
|
102
103
|
message(message2)
|
103
104
|
end
|
104
105
|
aaa = response.to_hash[:get_subscriber_response][:subscriber][:avp]
|
@@ -111,7 +112,7 @@ class Pcps
|
|
111
112
|
:networkId => username,
|
112
113
|
:newAvp => attlist
|
113
114
|
}
|
114
|
-
response =
|
115
|
+
response = client_cps.call(:change_subscriber_avps) do
|
115
116
|
message(message1)
|
116
117
|
end
|
117
118
|
response.to_hash
|
@@ -55,8 +55,8 @@ class StateWTTX
|
|
55
55
|
if !result_code
|
56
56
|
"false"
|
57
57
|
else
|
58
|
-
reg_imsi = /<field code
|
59
|
-
reg_imei = /<field code
|
58
|
+
reg_imsi = /<field code="imsi" value="([0-9]{10,15})"/
|
59
|
+
reg_imei = /<field code="imei" value="([0-9]{10,17})"/
|
60
60
|
|
61
61
|
m1 = reg_imsi.match(content)
|
62
62
|
m2 = reg_imei.match(content)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imperituroard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dzmitry Buynovskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,6 +206,7 @@ files:
|
|
206
206
|
- lib/imperituroard.rb
|
207
207
|
- lib/imperituroard/.DS_Store
|
208
208
|
- lib/imperituroard/add_functions/logger/any_functions.rb
|
209
|
+
- lib/imperituroard/platforms/cps/cps_mongo_connector.rb
|
209
210
|
- lib/imperituroard/platforms/cps/cps_multiple_thread_req.rb
|
210
211
|
- lib/imperituroard/platforms/cps/qps_connector.rb
|
211
212
|
- lib/imperituroard/platforms/cps/request_formatter.rb
|
@@ -233,6 +234,7 @@ files:
|
|
233
234
|
- lib/imperituroard/projects/mhub/subs/dabrab/dabrab_platform.rb
|
234
235
|
- lib/imperituroard/projects/mhub/subs/dabrab/dabrab_proced.rb
|
235
236
|
- lib/imperituroard/projects/mhub/subs/evrotorg/gms_connector.rb
|
237
|
+
- lib/imperituroard/projects/oats/fttx_acl/add_acl_fttx.rb
|
236
238
|
- lib/imperituroard/projects/ukaz60.rb
|
237
239
|
- lib/imperituroard/projects/ukaz60/belgim.rb
|
238
240
|
- lib/imperituroard/projects/ukaz60/dns.rb
|