network-utility 1.1.10 → 1.1.12
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 +3 -3
- data/document/if-NE40E-X16A.md +1 -1
- 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: 5e147c9d25f2b2508405d772b0da3ff789575a0b04a0a32e1078afa0cd9053ee
|
4
|
+
data.tar.gz: 305156de2fdde612946187cf576f01f068ca91a1085f4550cd619a559d47f2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e08ff60e1f6a838b8663f845750417cb489ce1e6c062499ec9aad3275d9afdce12599a92cb355ac45726296ce02d9bc2039eeed06a95bce5eee1e842f63c171
|
7
|
+
data.tar.gz: 217d2c6545f947b7419aa5af4ed6b72905d1c0406af3b2970a0425126cef66938716d1cb629f7c9dd6703b48baf5e224fd54ead88342966276dbf81afd416c39
|
data/document/config.md
CHANGED
@@ -1053,7 +1053,7 @@ module CR16010H_F
|
|
1053
1053
|
begin
|
1054
1054
|
raw.split("\n")
|
1055
1055
|
rescue
|
1056
|
-
raw = braw.force_encoding('GBK').encode('UTF-8')
|
1056
|
+
raw = braw.force_encoding('GBK').encode('UTF-8').gsub("\r","")
|
1057
1057
|
end
|
1058
1058
|
cfg = {}
|
1059
1059
|
hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
|
@@ -1090,7 +1090,7 @@ module CR16018_F
|
|
1090
1090
|
begin
|
1091
1091
|
raw.split("\n")
|
1092
1092
|
rescue
|
1093
|
-
raw = braw.force_encoding('GBK').encode('UTF-8')
|
1093
|
+
raw = braw.force_encoding('GBK').encode('UTF-8').gsub("\r","")
|
1094
1094
|
end
|
1095
1095
|
cfg = {}
|
1096
1096
|
hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
|
@@ -1127,7 +1127,7 @@ module CR19000_20
|
|
1127
1127
|
begin
|
1128
1128
|
raw.split("\n")
|
1129
1129
|
rescue
|
1130
|
-
raw = braw.force_encoding('GBK').encode('UTF-8')
|
1130
|
+
raw = braw.force_encoding('GBK').encode('UTF-8').gsub("\r","")
|
1131
1131
|
end
|
1132
1132
|
cfg = {}
|
1133
1133
|
hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
|
data/document/if-NE40E-X16A.md
CHANGED
@@ -68,7 +68,7 @@ module NE40E_X16A
|
|
68
68
|
# func: 根据一个端口的描述信息,给出其格式化的类型、连接符、端口编号
|
69
69
|
def 端口识别 描述
|
70
70
|
连接符 = ''
|
71
|
-
type = /100GE|GE|GigabitEthernet|Pos|Ethernet|Eth\-Trunk|Vlanif|Virtual\-Template|NULL|LoopBack|Aux/.match(描述)
|
71
|
+
type = /100GE|GE|GigabitEthernet|Global\-VE|Pos|Ethernet|Eth\-Trunk|Ip-Trunk|ServiceIf|Tunnel|Vlanif|Virtual\-Template|NULL|LoopBack|Logic\-Channel|Aux/.match(描述)
|
72
72
|
类型 = type ? type.to_s : '未知类型'
|
73
73
|
port = /(\d+|\/|\.)*(\d+)/.match(描述.split(类型).join)
|
74
74
|
端口 = port ? port.to_s : '未知端口'
|
data/network.rb
CHANGED