network-utility 1.1.35 → 1.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/document/config.md +4 -4
- data/document/static-NE5000E-20.md +1 -0
- data/document/static-NE5000E-X16.md +1 -0
- data/document/static-NE5000E-X16A.md +1 -0
- data/document/static-NE8000E-X8.md +1 -0
- data/document/static-NE8100-X8.md +1 -0
- data/network.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 806756db10bd4ab8fc9e4d26543578a0cdf40872b6eed69cfcb1f05b60902594
|
|
4
|
+
data.tar.gz: a9fd3481c42709bbacd846e63d3ce606857afffbf86d37ed39126bdcf41bcab8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d66879ce6f7a63666c89f1865a4e0d5f54d90e55024572dfa55fd99daefd73101a84a704e34c5fe61fff96a0f40dc6aede5ab4cf00a859e6aee80741cbaf237
|
|
7
|
+
data.tar.gz: f8401ba31b6c4c320a530045f5b52699c9f22b23668669195898032c448c27fcf5fa3b92045f96323f4dcca8bd633f4038fbf139101bc66053531d056b36ef68
|
data/document/config.md
CHANGED
|
@@ -225,8 +225,8 @@ module NE40E
|
|
|
225
225
|
def 配置解析 raw,*guards
|
|
226
226
|
cfg = {}
|
|
227
227
|
hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
|
|
228
|
-
prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
|
|
229
|
-
return cfg unless prepart
|
|
228
|
+
# prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
|
|
229
|
+
# return cfg unless prepart
|
|
230
230
|
content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
|
|
231
231
|
pretent = "\n"+content
|
|
232
232
|
while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
|
|
@@ -254,8 +254,8 @@ module NE80E
|
|
|
254
254
|
def 配置解析 raw,*guards
|
|
255
255
|
cfg = {}
|
|
256
256
|
hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
|
|
257
|
-
prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
|
|
258
|
-
return cfg unless prepart
|
|
257
|
+
# prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
|
|
258
|
+
# return cfg unless prepart
|
|
259
259
|
content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
|
|
260
260
|
pretent = "\n"+content
|
|
261
261
|
while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
|
|
@@ -13,6 +13,7 @@ module NE5000E_20
|
|
|
13
13
|
(配置散列[tag] || []).each do|part|
|
|
14
14
|
if part.include?('route-static')
|
|
15
15
|
part.split("\n").each do|line|
|
|
16
|
+
next unless line.include?('route-static')
|
|
16
17
|
items = line.split(" ")
|
|
17
18
|
record = items[2].include?('vpn-') ? ["static:#{items[3]}"]+items[4..-1] : ["static"]+items[2..-1]
|
|
18
19
|
static_routes << record
|
|
@@ -13,6 +13,7 @@ module NE5000E_X16
|
|
|
13
13
|
(配置散列[tag] || []).each do|part|
|
|
14
14
|
if part.include?('route-static')
|
|
15
15
|
part.split("\n").each do|line|
|
|
16
|
+
next unless line.include?('route-static')
|
|
16
17
|
items = line.split(" ")
|
|
17
18
|
record = items[2].include?('vpn-') ? ["static:#{items[3]}"]+items[4..-1] : ["static"]+items[2..-1]
|
|
18
19
|
static_routes << record
|
|
@@ -13,6 +13,7 @@ module NE5000E_X16A
|
|
|
13
13
|
(配置散列[tag] || []).each do|part|
|
|
14
14
|
if part.include?('route-static')
|
|
15
15
|
part.split("\n").each do|line|
|
|
16
|
+
next unless line.include?('route-static')
|
|
16
17
|
items = line.split(" ")
|
|
17
18
|
record = items[2].include?('vpn-') ? ["static:#{items[3]}"]+items[4..-1] : ["static"]+items[2..-1]
|
|
18
19
|
static_routes << record
|
|
@@ -13,6 +13,7 @@ module NE8000E_X8
|
|
|
13
13
|
(配置散列[tag] || []).each do|part|
|
|
14
14
|
if part.include?('route-static')
|
|
15
15
|
part.split("\n").each do|line|
|
|
16
|
+
next unless line.include?('route-static')
|
|
16
17
|
items = line.split(" ")
|
|
17
18
|
record = items[2].include?('vpn-') ? ["static:#{items[3]}"]+items[4..-1] : ["static"]+items[2..-1]
|
|
18
19
|
static_routes << record
|
|
@@ -13,6 +13,7 @@ module NE8100_X8
|
|
|
13
13
|
(配置散列[tag] || []).each do|part|
|
|
14
14
|
if part.include?('route-static')
|
|
15
15
|
part.split("\n").each do|line|
|
|
16
|
+
next unless line.include?('route-static')
|
|
16
17
|
items = line.split(" ")
|
|
17
18
|
record = items[2].include?('vpn-') ? ["static:#{items[3]}"]+items[4..-1] : ["static"]+items[2..-1]
|
|
18
19
|
static_routes << record
|
data/network.rb
CHANGED