network-utility 1.1.41 → 1.1.42
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-T8000-18.md +26 -0
- data/document/flexe-CX600-X16A.md +74 -0
- data/document/flexe-CX600-X8A.md +73 -0
- data/document/flexe-NE8000E-X8.md +73 -0
- data/document/flexe-NE8100-X8.md +74 -0
- data/document/isis-CX600-X16A.md +140 -0
- data/document/isis-CX600-X8A.md +141 -0
- data/document/isis-NE40E-X16A.md +141 -0
- data/document/isis-NE8000E-X8.md +140 -0
- data/document/isis-NE8100-X8.md +140 -0
- data/document/policy-CX600-X16A.md +87 -0
- data/document/policy-CX600-X8A.md +87 -0
- data/document/policy-NE8000E-X8.md +87 -0
- data/document/policy-NE8100-X8.md +87 -0
- data/document/policy-VNE9000.md +87 -0
- data/document/statistics-M6000-16E.md +56 -0
- data/document/statistics-M6000-18S.md +147 -0
- data/document/statistics-M6000-8.md +56 -0
- data/document/statistics-M6000-8E.md +56 -0
- data/document/vpn-CX600-X16A.md +78 -0
- data/document/vpn-CX600-X8A.md +79 -0
- data/document/vpn-ZXCTN9000-18EA.md +74 -0
- data/document/vpn-ZXCTN9000-8EA.md +74 -0
- data/network.rb +1 -1
- metadata +24 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# CX600-X8A VPN
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['CX600-X8A', 'vpn_instance']
|
|
5
|
+
@sign << ['CX600-X8A', 'evpn_instance']
|
|
6
|
+
@sign << ['CX600-X8A', 'bridge_domain']
|
|
7
|
+
@sign << ['CX600-X8A', 'if_bridge_domain']
|
|
8
|
+
|
|
9
|
+
module CX600_X8A
|
|
10
|
+
module_function
|
|
11
|
+
|
|
12
|
+
def vpn_instance conf
|
|
13
|
+
doc = {}
|
|
14
|
+
vpn_family = 'ipv4-family'
|
|
15
|
+
conf.split("\n").each do|line|
|
|
16
|
+
doc['vpn-name'] = line.split('vpn-instance ').last.strip if line.include?('ip') && line.include?('vpn-instance')
|
|
17
|
+
vpn_family = 'ipv4-family' if line.include?('ipv4-family')
|
|
18
|
+
vpn_family = 'ipv6-family' if line.include?('ipv6-family')
|
|
19
|
+
doc[vpn_family] ||= {}
|
|
20
|
+
doc[vpn_family]['route-distinguisher'] = line.split('route-distinguisher ').last.strip if line.include?('route-distinguisher')
|
|
21
|
+
if line.include?('vpn-target')
|
|
22
|
+
family = line.include?('evpn') ? 'evpn' : vpn_family.split('-').first
|
|
23
|
+
direction = 'export' if line.include?('export')
|
|
24
|
+
direction = 'import' if line.include?('import')
|
|
25
|
+
words = line.split('vpn-target ').last.split(' ')
|
|
26
|
+
target = words.select{|w|!w.include?('community') && !w.include?('evpn') && !w.strip.empty?}.map{|w|w.strip}
|
|
27
|
+
doc[vpn_family][family] ||= {}
|
|
28
|
+
doc[vpn_family][family][direction] ||= []
|
|
29
|
+
doc[vpn_family][family][direction] += target
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
return doc
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def evpn_instance conf
|
|
36
|
+
doc = {}
|
|
37
|
+
conf.split("\n").each do|line|
|
|
38
|
+
doc['vpn-name'] = line.split('vpn-instance ')[-1].split(' ').first.strip if line.include?('evpn') && line.include?('vpn-instance')
|
|
39
|
+
doc['mode'] = 'bd-mode' if line.include?('bd-mode') && line.include?('vpn-instance')
|
|
40
|
+
doc['route-distinguisher'] = line.split('route-distinguisher ').last.strip if line.include?('route-distinguisher')
|
|
41
|
+
if line.include?('segment-routing')
|
|
42
|
+
doc['segment-routing'] ||= {}
|
|
43
|
+
family = line.include?('ipv6') ? 'ipv6-family' : 'ipv4-family'
|
|
44
|
+
doc['segment-routing'][family] ||= {}
|
|
45
|
+
doc['segment-routing'][family]['mode'] = 'best-effort' if line.include?('best-effort')
|
|
46
|
+
doc['segment-routing'][family]['locator'] = line.split('locator ').last.strip if line.include?('locator')
|
|
47
|
+
end
|
|
48
|
+
if line.include?('vpn-target')
|
|
49
|
+
direction = 'export' if line.include?('export')
|
|
50
|
+
direction = 'import' if line.include?('import')
|
|
51
|
+
words = line.split('vpn-target ').last.split(' ')
|
|
52
|
+
target = words.select{|w|!w.include?('community') && !w.include?('evpn') && !w.strip.empty?}.map{|w|w.strip}
|
|
53
|
+
doc['vpn-target'] ||= {}
|
|
54
|
+
doc['vpn-target'][direction] ||= []
|
|
55
|
+
doc['vpn-target'][direction] += target
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
return doc
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def bridge_domain bdconf
|
|
62
|
+
bd = {}
|
|
63
|
+
bdconf.split("\n").each do|line|
|
|
64
|
+
bd['bridge-domain'] = line.split(' ').last.strip if line.include?('bridge-domain')
|
|
65
|
+
bd['statistic'] = 'enable' if line.include?('statistic enable')
|
|
66
|
+
bd['evpn-instance'] = line.split("vpn-instance").last.strip if line.include?('vpn-instance')
|
|
67
|
+
end
|
|
68
|
+
return bd
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def if_bridge_domain ifconf
|
|
72
|
+
ifconf.split("\n").each do|line|
|
|
73
|
+
return line.split(' ').last.strip if line.include?('bridge-domain')
|
|
74
|
+
end
|
|
75
|
+
return nil
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ZXCTN9000-18EA VPN
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['ZXCTN9000-18EA', 'l2vpn']
|
|
5
|
+
@sign << ['ZXCTN9000-18EA', 'vpls']
|
|
6
|
+
@sign << ['ZXCTN9000-18EA', 'vpls_if']
|
|
7
|
+
|
|
8
|
+
module ZXCTN9000_18EA
|
|
9
|
+
module_function
|
|
10
|
+
|
|
11
|
+
def l2vpn conf
|
|
12
|
+
content = (conf['l2vpn'] || "")
|
|
13
|
+
instances = TextAbstract.match_paragraph(content, "\nvpls ", "\n$").map{|t|"vpls "+t+"\n$"}
|
|
14
|
+
return instances
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def vpls conf
|
|
18
|
+
doc = {};mode = nil
|
|
19
|
+
conf.split("\n").each do|line|
|
|
20
|
+
doc['vpn-name'] = line.split('vpls ').last.split(' ').first.strip if line.include?('vpls ')
|
|
21
|
+
doc['mode'] = line.include?('vpls ') && line.include?('evpn') ? 'vpls-evpn' : 'vpls'
|
|
22
|
+
doc['rd'] = line.split('rd ').last.strip if line.include?(' rd ')
|
|
23
|
+
if line.include?('auto-discovery')
|
|
24
|
+
mode = line.split('auto-discovery ').last.strip
|
|
25
|
+
doc['auto-discovery'] = mode
|
|
26
|
+
end
|
|
27
|
+
if line.include?('route-target')
|
|
28
|
+
direction = 'export' if line.include?('export')
|
|
29
|
+
direction = 'import' if line.include?('import')
|
|
30
|
+
words = line.split('route-target ').last.split(' ')
|
|
31
|
+
target = words.select{|w|!w.include?('route-target') && !w.include?('port') && !w.strip.empty?}.map{|w|w.strip}
|
|
32
|
+
if mode
|
|
33
|
+
doc[mode] ||= {}
|
|
34
|
+
doc[mode]['route-target'] ||= {}
|
|
35
|
+
doc[mode]['route-target'][direction] ||= []
|
|
36
|
+
doc[mode]['route-target'][direction] += target
|
|
37
|
+
else
|
|
38
|
+
doc['route-target'] ||= {}
|
|
39
|
+
doc['route-target'][direction] ||= []
|
|
40
|
+
doc['route-target'][direction] += target
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
if line.include?('srv6 locator')
|
|
44
|
+
locator = line.split('srv6 locator').last.strip
|
|
45
|
+
if mode
|
|
46
|
+
doc[mode]['srv6-locator'] = locator
|
|
47
|
+
else
|
|
48
|
+
doc['srv6-locator'] = locator
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
return doc
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def vpls_if conf
|
|
56
|
+
doc = {}
|
|
57
|
+
access_points = TextAbstract.match_paragraph(conf, "\n access-point ", "\n $").map{|t|" access-point "+t+"\n $"}
|
|
58
|
+
doc['vpn-name'] = conf.split("\n").first.split('vpls ').last.split(' ').first.strip
|
|
59
|
+
access_points.each do|access_point|
|
|
60
|
+
doc['access-point'] ||= {}
|
|
61
|
+
port = nil
|
|
62
|
+
access_point.split("\n").each do|line|
|
|
63
|
+
port = line.split('access-point').last.strip if line.include?('access-point ')
|
|
64
|
+
if port
|
|
65
|
+
doc['access-point'][port] ||= {}
|
|
66
|
+
doc['access-point'][port]['access-params'] ||= [line.split('access-params').last.strip] if line.include?('access-params')
|
|
67
|
+
(doc['access-point'][port]['access-params'] ||= [])<< 'leaf' if line.include?('leaf')
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
return doc
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ZXCTN9000-8EA VPN
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['ZXCTN9000-8EA', 'l2vpn']
|
|
5
|
+
@sign << ['ZXCTN9000-8EA', 'vpls']
|
|
6
|
+
@sign << ['ZXCTN9000-8EA', 'vpls_if']
|
|
7
|
+
|
|
8
|
+
module ZXCTN9000_8EA
|
|
9
|
+
module_function
|
|
10
|
+
|
|
11
|
+
def l2vpn conf
|
|
12
|
+
content = (conf['l2vpn'] || "")
|
|
13
|
+
instances = TextAbstract.match_paragraph(content, "\nvpls ", "\n$").map{|t|"vpls "+t+"\n$"}
|
|
14
|
+
return instances
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def vpls conf
|
|
18
|
+
doc = {};mode = nil
|
|
19
|
+
conf.split("\n").each do|line|
|
|
20
|
+
doc['vpn-name'] = line.split('vpls ').last.split(' ').first.strip if line.include?('vpls ')
|
|
21
|
+
doc['mode'] = line.include?('vpls ') && line.include?('evpn') ? 'vpls-evpn' : 'vpls'
|
|
22
|
+
doc['rd'] = line.split('rd ').last.strip if line.include?(' rd ')
|
|
23
|
+
if line.include?('auto-discovery')
|
|
24
|
+
mode = line.split('auto-discovery ').last.strip
|
|
25
|
+
doc['auto-discovery'] = mode
|
|
26
|
+
end
|
|
27
|
+
if line.include?('route-target')
|
|
28
|
+
direction = 'export' if line.include?('export')
|
|
29
|
+
direction = 'import' if line.include?('import')
|
|
30
|
+
words = line.split('route-target ').last.split(' ')
|
|
31
|
+
target = words.select{|w|!w.include?('route-target') && !w.include?('port') && !w.strip.empty?}.map{|w|w.strip}
|
|
32
|
+
if mode
|
|
33
|
+
doc[mode] ||= {}
|
|
34
|
+
doc[mode]['route-target'] ||= {}
|
|
35
|
+
doc[mode]['route-target'][direction] ||= []
|
|
36
|
+
doc[mode]['route-target'][direction] += target
|
|
37
|
+
else
|
|
38
|
+
doc['route-target'] ||= {}
|
|
39
|
+
doc['route-target'][direction] ||= []
|
|
40
|
+
doc['route-target'][direction] += target
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
if line.include?('srv6 locator')
|
|
44
|
+
locator = line.split('srv6 locator').last.strip
|
|
45
|
+
if mode
|
|
46
|
+
doc[mode]['srv6-locator'] = locator
|
|
47
|
+
else
|
|
48
|
+
doc['srv6-locator'] = locator
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
return doc
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def vpls_if conf
|
|
56
|
+
doc = {}
|
|
57
|
+
access_points = TextAbstract.match_paragraph(conf, "\n access-point ", "\n $").map{|t|" access-point "+t+"\n $"}
|
|
58
|
+
doc['vpn-name'] = conf.split("\n").first.split('vpls ').last.split(' ').first.strip
|
|
59
|
+
access_points.each do|access_point|
|
|
60
|
+
doc['access-point'] ||= {}
|
|
61
|
+
port = nil
|
|
62
|
+
access_point.split("\n").each do|line|
|
|
63
|
+
port = line.split('access-point').last.strip if line.include?('access-point ')
|
|
64
|
+
if port
|
|
65
|
+
doc['access-point'][port] ||= {}
|
|
66
|
+
doc['access-point'][port]['access-params'] ||= [line.split('access-params').last.strip] if line.include?('access-params')
|
|
67
|
+
(doc['access-point'][port]['access-params'] ||= [])<< 'leaf' if line.include?('leaf')
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
return doc
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
```
|
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: 1.1.
|
|
4
|
+
version: 1.1.42
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt
|
|
@@ -63,6 +63,7 @@ files:
|
|
|
63
63
|
- document/acl-NE5000E-X16.md
|
|
64
64
|
- document/acl-NE5000E-X16A.md
|
|
65
65
|
- document/acl-NE80E.md
|
|
66
|
+
- document/acl-T8000-18.md
|
|
66
67
|
- document/bgp-CR16010H-F.md
|
|
67
68
|
- document/bgp-CR16018-F.md
|
|
68
69
|
- document/bgp-CR19000-20.md
|
|
@@ -83,6 +84,10 @@ files:
|
|
|
83
84
|
- document/bgp-NE80E.md
|
|
84
85
|
- document/config.md
|
|
85
86
|
- document/document.rb
|
|
87
|
+
- document/flexe-CX600-X16A.md
|
|
88
|
+
- document/flexe-CX600-X8A.md
|
|
89
|
+
- document/flexe-NE8000E-X8.md
|
|
90
|
+
- document/flexe-NE8100-X8.md
|
|
86
91
|
- document/if-ALCATEL7750.md
|
|
87
92
|
- document/if-C7609.md
|
|
88
93
|
- document/if-CR16010H-F.md
|
|
@@ -114,6 +119,11 @@ files:
|
|
|
114
119
|
- document/if-VNE9000.md
|
|
115
120
|
- document/if-ZXCTN9000-18EA.md
|
|
116
121
|
- document/if-ZXCTN9000-8EA.md
|
|
122
|
+
- document/isis-CX600-X16A.md
|
|
123
|
+
- document/isis-CX600-X8A.md
|
|
124
|
+
- document/isis-NE40E-X16A.md
|
|
125
|
+
- document/isis-NE8000E-X8.md
|
|
126
|
+
- document/isis-NE8100-X8.md
|
|
117
127
|
- document/lic-M6000-16E.md
|
|
118
128
|
- document/lic-M6000-18S.md
|
|
119
129
|
- document/lic-M6000-8.md
|
|
@@ -149,6 +159,8 @@ files:
|
|
|
149
159
|
- document/nat-ME60-X16.md
|
|
150
160
|
- document/nat-NE40E-X16.md
|
|
151
161
|
- document/nat-NE40E-X16A.md
|
|
162
|
+
- document/policy-CX600-X16A.md
|
|
163
|
+
- document/policy-CX600-X8A.md
|
|
152
164
|
- document/policy-M6000-16E.md
|
|
153
165
|
- document/policy-M6000-18S.md
|
|
154
166
|
- document/policy-M6000-8.md
|
|
@@ -163,7 +175,10 @@ files:
|
|
|
163
175
|
- document/policy-NE5000E-20.md
|
|
164
176
|
- document/policy-NE5000E-X16.md
|
|
165
177
|
- document/policy-NE5000E-X16A.md
|
|
178
|
+
- document/policy-NE8000E-X8.md
|
|
166
179
|
- document/policy-NE80E.md
|
|
180
|
+
- document/policy-NE8100-X8.md
|
|
181
|
+
- document/policy-VNE9000.md
|
|
167
182
|
- document/pool-M6000-16E.md
|
|
168
183
|
- document/pool-M6000-18S.md
|
|
169
184
|
- document/pool-M6000-8.md
|
|
@@ -201,6 +216,10 @@ files:
|
|
|
201
216
|
- document/static-T8000-18.md
|
|
202
217
|
- document/static-ZXCTN9000-18EA.md
|
|
203
218
|
- document/static-ZXCTN9000-8EA.md
|
|
219
|
+
- document/statistics-M6000-16E.md
|
|
220
|
+
- document/statistics-M6000-18S.md
|
|
221
|
+
- document/statistics-M6000-8.md
|
|
222
|
+
- document/statistics-M6000-8E.md
|
|
204
223
|
- document/system-M6000-16E.md
|
|
205
224
|
- document/system-M6000-18S.md
|
|
206
225
|
- document/system-M6000-8.md
|
|
@@ -217,6 +236,10 @@ files:
|
|
|
217
236
|
- document/system-NE5000E-X16A.md
|
|
218
237
|
- document/system-NE80E.md
|
|
219
238
|
- document/telnet.md
|
|
239
|
+
- document/vpn-CX600-X16A.md
|
|
240
|
+
- document/vpn-CX600-X8A.md
|
|
241
|
+
- document/vpn-ZXCTN9000-18EA.md
|
|
242
|
+
- document/vpn-ZXCTN9000-8EA.md
|
|
220
243
|
- network.rb
|
|
221
244
|
- support/snmp.rb
|
|
222
245
|
- utility/ipv4_address.rb
|