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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ed31f6d3fd8bd8901b0f0b70f11e5a6ae2a29006dc77bd345e448fff7bb9b48
4
- data.tar.gz: 4cfd31e694af5307bc9358924dd2548a8315f646a5e16030eb21a248c03c02eb
3
+ metadata.gz: 76df9b9cedac6e23575d726c35bd8b4af04a259e4a3b9ddf8350d95755bb8241
4
+ data.tar.gz: 15dab7c453a86eacce87a525383f53f8a0fc0ab49b1d8309742fd3d57f3432c9
5
5
  SHA512:
6
- metadata.gz: c2dd6922f7d9de15cf2d9ee5c7506993e2f7272e5a63ead6534a7f8324211e2d9ed7662401199ae4c35f4124905ca65286ff82985b0f5bf35085742af261a7d9
7
- data.tar.gz: 1db2d8ed2c0b9ea7a16b04895cff626bcbaad314fc3e72627b25ce49fe1e486fa8370bf60a61c0bd9a5f1ec081bb973674eaa1c3e6c907fc67fc49184f254376
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
 
@@ -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 : '未知端口'
@@ -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
@@ -22,5 +22,5 @@
22
22
  ].each{|mod|require mod}
23
23
 
24
24
  module Network
25
- VERSION = '1.1.28'
25
+ VERSION = '1.1.30'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: network-utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.28
4
+ version: 1.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt