network-utility 2.0.7 → 2.0.9
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/acl-CX600-X16A.md +204 -0
- data/document/acl-CX600-X8A.md +204 -0
- data/document/acl-ZXCTN9000-18EA.md +77 -0
- data/document/acl-ZXCTN9000-8EA.md +77 -0
- data/document/bgp-CX600-X16A.md +139 -0
- data/document/bgp-CX600-X8A.md +139 -0
- data/document/bgp-ZXCTN9000-18EA.md +135 -0
- data/document/bgp-ZXCTN9000-8EA.md +135 -0
- data/document/isis-ZXCTN9000-18EA.md +99 -0
- data/document/isis-ZXCTN9000-8EA.md +99 -0
- data/network.rb +1 -1
- metadata +11 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ZXCTN9000-8EA isis
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['ZXCTN9000-8EA', '接口isis']
|
|
5
|
+
@sign << ['ZXCTN9000-8EA', 'isis接口']
|
|
6
|
+
@sign << ['ZXCTN9000-8EA', 'isis']
|
|
7
|
+
|
|
8
|
+
module ZXCTN9000_8EA
|
|
9
|
+
module_function
|
|
10
|
+
|
|
11
|
+
def 接口isis 接口配置 # from isis module
|
|
12
|
+
isis = {}
|
|
13
|
+
port_name = self.端口识别(接口配置.split("\n").first.to_s).join()
|
|
14
|
+
接口配置.split("\n").each do|line|
|
|
15
|
+
isis['isis'] = 'enable' if line.include?('ip router isis')
|
|
16
|
+
isis['isis-ipv6'] = 'enable' if line.include?('ipv6 router isis')
|
|
17
|
+
if line.include?('metric') && line.include?('level') && !line.include?('ipv6')
|
|
18
|
+
isis['metric'] = {
|
|
19
|
+
'value' => line.split('metric ').last.split(' ').first,
|
|
20
|
+
'type' => line.split(' ').find{|w|w.include?('level')}
|
|
21
|
+
}
|
|
22
|
+
elsif line.include?('metric') && line.include?('level') && line.include?('ipv6')
|
|
23
|
+
isis['metric-ipv6'] = {
|
|
24
|
+
'value' => line.split('metric ').last.split(' ').first,
|
|
25
|
+
'type' => line.split(' ').find{|w|w.include?('level')}
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
isis['circuit-type'] = line.split('circuit-type').last.strip if line.include?('circuit-type')
|
|
29
|
+
isis['network'] = line.split('network').last.strip if line.include?('network')
|
|
30
|
+
if line.include?('authentication')
|
|
31
|
+
isis['authentication'] ||= {}
|
|
32
|
+
if line.include?('authentication-type')
|
|
33
|
+
isis['authentication']['type'] = line.split('authentication-type').last.strip
|
|
34
|
+
elsif line.include?('authentication encrypted')
|
|
35
|
+
isis['authentication']['password'] = line.split('authentication').last.strip
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
return { port_name => isis }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def isis接口 isis配置
|
|
43
|
+
isis配置.match_paragraph("\n interface ", "\n $")
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def isis isis配置
|
|
47
|
+
isis = {};aflag,iflag = false, false;af_name = nil
|
|
48
|
+
isis配置.split("\n").each do|line|
|
|
49
|
+
if line.include?('address-family ')
|
|
50
|
+
aflag = true
|
|
51
|
+
isis['address-family'] ||= {}
|
|
52
|
+
af_name = line.split(' ').last
|
|
53
|
+
isis['address-family'][af_name] ||= {}
|
|
54
|
+
elsif line.include?('interface ')
|
|
55
|
+
bflag = true
|
|
56
|
+
end
|
|
57
|
+
(aflag = false;af_name=nil) if aflag && line.strip=='$'
|
|
58
|
+
iflag = false if iflag && line.strip=='$'
|
|
59
|
+
if aflag
|
|
60
|
+
isis['address-family'][af_name]['distance'] = line.split('distance').last.strip if line.include?('distance')
|
|
61
|
+
isis['address-family'][af_name]['maximum-paths'] = line.split('maximum-paths').last.strip if line.include?('maximum-paths')
|
|
62
|
+
isis['address-family'][af_name]['multi-topology'] = line.split('multi-topology').last.strip if line.include?('multi-topology')
|
|
63
|
+
if line.include?('metric')
|
|
64
|
+
isis['address-family'][af_name]['metric'] = {
|
|
65
|
+
'value' => line.split("metric").last.split(' ').first.strip,
|
|
66
|
+
'type' => line.split(' ').find{|s|s.include?('level')}.to_s.strip
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
if !aflag && !iflag
|
|
71
|
+
isis['pid'] = line.split(' ').last.strip if line.include?('router isis ')
|
|
72
|
+
isis['area'] = line.split(' ').last.strip if line.include?('area ')
|
|
73
|
+
isis['system-id'] = line.split(' ').last.strip if line.include?('system-id ')
|
|
74
|
+
isis['is-type'] = line.split(' ').last.strip if line.include?('is-type ')
|
|
75
|
+
isis['distance'] = line.split(' ').last.strip if line.include?('distance ')
|
|
76
|
+
isis['lsp-refresh-time'] = line.split(' ').last.strip if line.include?('lsp-refresh-time')
|
|
77
|
+
isis['max-lsp-lifetime'] = line.split(' ').last.strip if line.include?('max-lsp-lifetime')
|
|
78
|
+
isis['maximum-paths'] = line.split(' ').last.strip if line.include?('maximum-paths')
|
|
79
|
+
if line.include?('metric')
|
|
80
|
+
isis['metric'] ||= {}
|
|
81
|
+
if line.include?('metric-style ')
|
|
82
|
+
isis['metric']['style'] = line.split(' ').last.strip
|
|
83
|
+
else
|
|
84
|
+
isis['metric'].merge!(
|
|
85
|
+
'value' => line.split("metric").last.split(' ').first.strip,
|
|
86
|
+
'type' => line.split(' ').find{|s|s.include?('level')}.to_s.strip
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
if line.include?('redistribute')
|
|
91
|
+
isis['redistribute'] ||= []
|
|
92
|
+
isis['redistribute'] << line.split(' ')[1..-1].join(' ')
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
return isis
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
```
|
data/network.rb
CHANGED
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: 2.0.
|
|
4
|
+
version: 2.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt
|
|
@@ -54,6 +54,8 @@ files:
|
|
|
54
54
|
- document/acl-CR16018-F.md
|
|
55
55
|
- document/acl-CR19000-20.md
|
|
56
56
|
- document/acl-CRS-16.md
|
|
57
|
+
- document/acl-CX600-X16A.md
|
|
58
|
+
- document/acl-CX600-X8A.md
|
|
57
59
|
- document/acl-M6000-16E.md
|
|
58
60
|
- document/acl-M6000-18S.md
|
|
59
61
|
- document/acl-M6000-8.md
|
|
@@ -70,10 +72,14 @@ files:
|
|
|
70
72
|
- document/acl-NE5000E-X16A.md
|
|
71
73
|
- document/acl-NE80E.md
|
|
72
74
|
- document/acl-T8000-18.md
|
|
75
|
+
- document/acl-ZXCTN9000-18EA.md
|
|
76
|
+
- document/acl-ZXCTN9000-8EA.md
|
|
73
77
|
- document/bgp-CR16010H-F.md
|
|
74
78
|
- document/bgp-CR16018-F.md
|
|
75
79
|
- document/bgp-CR19000-20.md
|
|
76
80
|
- document/bgp-CRS-16.md
|
|
81
|
+
- document/bgp-CX600-X16A.md
|
|
82
|
+
- document/bgp-CX600-X8A.md
|
|
77
83
|
- document/bgp-M6000-16E.md
|
|
78
84
|
- document/bgp-M6000-18S.md
|
|
79
85
|
- document/bgp-M6000-8.md
|
|
@@ -90,6 +96,8 @@ files:
|
|
|
90
96
|
- document/bgp-NE5000E-X16A.md
|
|
91
97
|
- document/bgp-NE80E.md
|
|
92
98
|
- document/bgp-T8000-18.md
|
|
99
|
+
- document/bgp-ZXCTN9000-18EA.md
|
|
100
|
+
- document/bgp-ZXCTN9000-8EA.md
|
|
93
101
|
- document/config.md
|
|
94
102
|
- document/document.rb
|
|
95
103
|
- document/flexe-CX600-X16A.md
|
|
@@ -146,6 +154,8 @@ files:
|
|
|
146
154
|
- document/isis-NE8100-X8.md
|
|
147
155
|
- document/isis-Nokia7750.md
|
|
148
156
|
- document/isis-T8000-18.md
|
|
157
|
+
- document/isis-ZXCTN9000-18EA.md
|
|
158
|
+
- document/isis-ZXCTN9000-8EA.md
|
|
149
159
|
- document/lic-M6000-16E.md
|
|
150
160
|
- document/lic-M6000-18S.md
|
|
151
161
|
- document/lic-M6000-8.md
|