imperituroard 1.1.12 → 1.1.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ require 'savon'
5
5
 
6
6
 
7
7
  class Pcps
8
- attr_accessor :wsdl, :endpoint, :namespace, :clientcps
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 = clientcps.call(:get_subscriber) do
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 = {"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
- if !aaa.is_a?(Hash)
40
- for i in aaa
41
- if i[:code]=="FRAMED-IP-ADDRESS"
42
- li["FRAMED-IP-ADDRESS"]=1
43
- elsif i[:code]=="FRAMED-NETMASK"
44
- li["FRAMED-NETMASK"]=1
45
- elsif i[:code]=="Default-Gateway"
46
- li["Default-Gateway"]=1
47
- elsif i[:code]=="VRF-ID"
48
- li["VRF-ID"]=1
49
- elsif i[:code]=="DHCP-CLASS"
50
- li["DHCP-CLASS"]=1
51
- elsif i[:code]=="IPV4-UNNUMB"
52
- li["IPV4-UNNUMB"]=1
53
- elsif i[:code]=="FRAMED-ROUTE-1"
54
- li["FRAMED-ROUTE-1"]=1
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 = clientcps.call(:change_subscriber_avps) do
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 = clientcps.call(:get_subscriber) do
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 = clientcps.call(:change_subscriber_avps) do
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=\"imsi\" value=\"([0-9]{10,15})\"/
59
- reg_imei = /<field code=\"imei\" value=\"([0-9]{10,17})\"/
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)
@@ -1,4 +1,4 @@
1
1
  module Imperituroard
2
- VERSION = "1.1.12"
2
+ VERSION = '1.1.18'
3
3
  end
4
4
 
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.12
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-09-19 00:00:00.000000000 Z
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