network-utility 1.1.28 → 1.1.30
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 +2 -0
- data/document/if-CX600-X16A.md +1 -1
- data/document/if-CX600-X8A.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: 76df9b9cedac6e23575d726c35bd8b4af04a259e4a3b9ddf8350d95755bb8241
|
|
4
|
+
data.tar.gz: 15dab7c453a86eacce87a525383f53f8a0fc0ab49b1d8309742fd3d57f3432c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c275d86741c490a05fd7f14e4692bc9eb6f64fa40c69bfcf688c611d848c93236e8c5fbdcd99325ecd3e758e18ffee2d41931760635ce03658876292467df2e
|
|
7
|
+
data.tar.gz: fd78a82529aa6e046e6fa610e664db2981a9d96752c5785d8bf0e6d1ac97ecb8a7a6fc99b3bbea1e21323bbc09f98544b65b70e8d345672f1e52756c77a5be24
|
data/document/config.md
CHANGED
|
@@ -940,6 +940,7 @@ module M6000_16E
|
|
|
940
940
|
raw = newraw.join("\n")
|
|
941
941
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
|
942
942
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
|
943
|
+
prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
|
|
943
944
|
return cfg unless prepart
|
|
944
945
|
content = prepart.split(/#{hostname}#( )*\n/)[0]
|
|
945
946
|
begin
|
|
@@ -1060,6 +1061,7 @@ module T8000_18
|
|
|
1060
1061
|
raw = newraw.join("\n")
|
|
1061
1062
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
|
1062
1063
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
|
1064
|
+
prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
|
|
1063
1065
|
return cfg unless prepart
|
|
1064
1066
|
content = prepart.split(/#{hostname}#( )*\n/)[0]
|
|
1065
1067
|
|
data/document/if-CX600-X16A.md
CHANGED
|
@@ -67,7 +67,7 @@ module CX600_X16A
|
|
|
67
67
|
# func: 根据一个端口的描述信息,给出其格式化的类型、连接符、端口编号
|
|
68
68
|
def 端口识别 描述
|
|
69
69
|
连接符 = ''
|
|
70
|
-
type = /GE|50\|100GE|50GE|100GE|GigabitEthernet|Pos|Ethernet|Eth\-Trunk|Global\-VE|FlexE\-100G|FlexE\-50\|100G|FlexE|Vlanif|Virtual\-Template|NULL|LoopBack|Logic\-Channel|Aux/.match(描述)
|
|
70
|
+
type = /GE|50\|100GE|50GE|100GE|GigabitEthernet|Pos|Virtual\-Ethernet|Ethernet|Eth\-Trunk|Global\-VE|FlexE\-100G|FlexE\-50\|100G|FlexE|Vlanif|Virtual\-Template|NULL|LoopBack|Logic\-Channel|Aux/.match(描述)
|
|
71
71
|
类型 = type ? type.to_s : '未知类型'
|
|
72
72
|
port = /(\d+|\/|\.)*(\d+)/.match(描述.split(类型).join)
|
|
73
73
|
端口 = port ? port.to_s : '未知端口'
|
data/document/if-CX600-X8A.md
CHANGED
|
@@ -67,7 +67,7 @@ module CX600_X8A
|
|
|
67
67
|
# func: 根据一个端口的描述信息,给出其格式化的类型、连接符、端口编号
|
|
68
68
|
def 端口识别 描述
|
|
69
69
|
连接符 = ''
|
|
70
|
-
type = /GE|50\|100GE|50GE|100GE|GigabitEthernet|Pos|Ethernet|Eth\-Trunk|Global\-VE|FlexE\-100G|FlexE\-50\|100G|FlexE|Vlanif|Virtual\-Template|NULL|LoopBack|Logic\-Channel|Aux/.match(描述)
|
|
70
|
+
type = /GE|50\|100GE|50GE|100GE|GigabitEthernet|Pos|Virtual\-Ethernet|Ethernet|Eth\-Trunk|Global\-VE|FlexE\-100G|FlexE\-50\|100G|FlexE|Vlanif|Virtual\-Template|NULL|LoopBack|Logic\-Channel|Aux/.match(描述)
|
|
71
71
|
类型 = type ? type.to_s : '未知类型'
|
|
72
72
|
port = /(\d+|\/|\.)*(\d+)/.match(描述.split(类型).join)
|
|
73
73
|
端口 = port ? port.to_s : '未知端口'
|
data/network.rb
CHANGED