network-utility 1.1.61 → 1.1.62
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-CR16010H-F.md +40 -0
- data/document/acl-CR16018-F.md +40 -0
- data/document/acl-CR19000-20.md +40 -0
- data/document/acl-CRS-16.md +40 -0
- data/document/acl-M6000-16E.md +55 -4
- data/document/acl-M6000-18S.md +55 -4
- data/document/acl-M6000-8.md +55 -4
- data/document/acl-M6000-8E.md +55 -4
- data/document/acl-NE5000E-20.md +17 -1
- data/document/acl-NE5000E-X16.md +17 -1
- data/document/acl-NE5000E-X16A.md +17 -1
- data/document/acl-T8000-18.md +55 -4
- data/document/telnet.md +11 -0
- data/network.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b52e37176f28650bea03c4d996018c516d5c780775725db49a3fde963f4a0e5f
|
|
4
|
+
data.tar.gz: 8f138c019e14c0bf9f24b24e50108dac4eea7cab22e7274d83babad0dbaec96e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d04392372b1e23d4c9157c9ab5ff47799c1ffbb1b3dcc045b3062629632d5b5fb0af13005d63e6ed42bfb28ec35cc300daf9046d18bb80621955c21359ff2e2e
|
|
7
|
+
data.tar.gz: abed1d881a283f5f722b5ed0f3b19324bdc805008b3e3fe050cdc5e36e40681e679a6d8aef044268d5961b254fb2bf97deb875eb8556ce84bbb51ab36086f6a0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# CR16010H-F 访问控制列表
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['CR16010H-F', 'ACL']
|
|
5
|
+
@sign << ['CR16010H-F', 'ACL6']
|
|
6
|
+
|
|
7
|
+
module CR16010H_F
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def ACL config
|
|
11
|
+
table = {}
|
|
12
|
+
number = nil
|
|
13
|
+
config.split("\n").each do|line|
|
|
14
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && !line.include?('ipv6 ')
|
|
15
|
+
table[number] ||= {}
|
|
16
|
+
if line.include?('rule')
|
|
17
|
+
rule = line.split(' ')
|
|
18
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
table.delete(nil)
|
|
22
|
+
return table
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def ACL6 config
|
|
26
|
+
table = {}
|
|
27
|
+
number = nil
|
|
28
|
+
config.split("\n").each do|line|
|
|
29
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && line.include?('ipv6 ')
|
|
30
|
+
table[number] ||= {}
|
|
31
|
+
if line.include?('rule')
|
|
32
|
+
rule = line.split(' ')
|
|
33
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
table.delete(nil)
|
|
37
|
+
return table
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# CR16018-F 访问控制列表
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['CR16018-F', 'ACL']
|
|
5
|
+
@sign << ['CR16018-F', 'ACL6']
|
|
6
|
+
|
|
7
|
+
module CR16018_F
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def ACL config
|
|
11
|
+
table = {}
|
|
12
|
+
number = nil
|
|
13
|
+
config.split("\n").each do|line|
|
|
14
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && !line.include?('ipv6 ')
|
|
15
|
+
table[number] ||= {}
|
|
16
|
+
if line.include?('rule')
|
|
17
|
+
rule = line.split(' ')
|
|
18
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
table.delete(nil)
|
|
22
|
+
return table
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def ACL6 config
|
|
26
|
+
table = {}
|
|
27
|
+
number = nil
|
|
28
|
+
config.split("\n").each do|line|
|
|
29
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && line.include?('ipv6 ')
|
|
30
|
+
table[number] ||= {}
|
|
31
|
+
if line.include?('rule')
|
|
32
|
+
rule = line.split(' ')
|
|
33
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
table.delete(nil)
|
|
37
|
+
return table
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# CR19000-20 访问控制列表
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['CR19000-20', 'ACL']
|
|
5
|
+
@sign << ['CR19000-20', 'ACL6']
|
|
6
|
+
|
|
7
|
+
module CR19000_20
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def ACL config
|
|
11
|
+
table = {}
|
|
12
|
+
number = nil
|
|
13
|
+
config.split("\n").each do|line|
|
|
14
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && !line.include?('ipv6 ')
|
|
15
|
+
table[number] ||= {}
|
|
16
|
+
if line.include?('rule')
|
|
17
|
+
rule = line.split(' ')
|
|
18
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
table.delete(nil)
|
|
22
|
+
return table
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def ACL6 config
|
|
26
|
+
table = {}
|
|
27
|
+
number = nil
|
|
28
|
+
config.split("\n").each do|line|
|
|
29
|
+
number = line.split(' ')[-1].strip.to_i if line.include?('acl ') && line.include?('ipv6 ')
|
|
30
|
+
table[number] ||= {}
|
|
31
|
+
if line.include?('rule')
|
|
32
|
+
rule = line.split(' ')
|
|
33
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
table.delete(nil)
|
|
37
|
+
return table
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# CRS-16 访问控制列表
|
|
2
|
+
|
|
3
|
+
```ruby
|
|
4
|
+
@sign << ['CRS-16', 'ACL']
|
|
5
|
+
@sign << ['CRS-16', 'ACL6']
|
|
6
|
+
|
|
7
|
+
module CRS_16
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def ACL config
|
|
11
|
+
table = {}
|
|
12
|
+
name = nil
|
|
13
|
+
config.split("\n").each do|line|
|
|
14
|
+
name = line.split('ipv4 access-list')[1].strip if line.include?('ipv4 access-list')
|
|
15
|
+
table[name] ||= {}
|
|
16
|
+
if line.include?('ipv4 ')
|
|
17
|
+
rule = line.split(' ')
|
|
18
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
table.delete(nil)
|
|
22
|
+
return table
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def ACL6 config
|
|
26
|
+
table = {}
|
|
27
|
+
name = nil
|
|
28
|
+
config.split("\n").each do|line|
|
|
29
|
+
name = line.split('ipv6 access-list')[1].strip if line.include?('ipv6 access-list')
|
|
30
|
+
table[name] ||= {}
|
|
31
|
+
if line.include?('ipv6 ')
|
|
32
|
+
rule = line.split(' ')
|
|
33
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
table.delete(nil)
|
|
37
|
+
return table
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
```
|
data/document/acl-M6000-16E.md
CHANGED
|
@@ -3,21 +3,72 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['M6000-16E', 'ACL']
|
|
6
|
+
@sign << ['M6000-16E', 'ACL6']
|
|
7
|
+
@sign << ['M6000-16E', 'LinkACL']
|
|
6
8
|
|
|
7
9
|
module M6000_16E
|
|
8
10
|
module_function
|
|
9
11
|
|
|
10
|
-
def ACL config
|
|
12
|
+
def ACL config, mode=:config # or :text
|
|
11
13
|
table = {}
|
|
12
14
|
name = nil
|
|
13
15
|
config.split("\n").each do|line|
|
|
14
16
|
name = line.split('ipv4-access-list')[1].strip if line.include?('ipv4-access-list')
|
|
17
|
+
table[name] ||= {}
|
|
18
|
+
if mode==:config
|
|
19
|
+
if line.include?('rule')
|
|
20
|
+
rule = line.split(' ')
|
|
21
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
22
|
+
end
|
|
23
|
+
elsif mode==:text
|
|
24
|
+
if line.include?('permit') || line.include?('deny')
|
|
25
|
+
rule = line.split(' ')
|
|
26
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
table.delete(nil)
|
|
31
|
+
return table
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def ACL6 config, mode=:config # or :text
|
|
35
|
+
table = {}
|
|
36
|
+
name = nil
|
|
37
|
+
config.split("\n").each do|line|
|
|
15
38
|
name = line.split('ipv6-access-list')[1].strip if line.include?('ipv6-access-list')
|
|
39
|
+
table[name] ||= {}
|
|
40
|
+
if mode==:config
|
|
41
|
+
if line.include?('rule')
|
|
42
|
+
rule = line.split(' ')
|
|
43
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
44
|
+
end
|
|
45
|
+
elsif mode==:text
|
|
46
|
+
if line.include?('permit') || line.include?('deny')
|
|
47
|
+
rule = line.split(' ')
|
|
48
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
table.delete(nil)
|
|
53
|
+
return table
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def LinkACL config, mode=:config # or :text
|
|
57
|
+
table = {}
|
|
58
|
+
name = nil
|
|
59
|
+
config.split("\n").each do|line|
|
|
16
60
|
name = line.split('link-access-list')[1].strip if line.include?('link-access-list')
|
|
17
61
|
table[name] ||= {}
|
|
18
|
-
if
|
|
19
|
-
|
|
20
|
-
|
|
62
|
+
if mode==:config
|
|
63
|
+
if line.include?('rule')
|
|
64
|
+
rule = line.split(' ')
|
|
65
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
66
|
+
end
|
|
67
|
+
elsif mode==:text
|
|
68
|
+
if line.include?('permit') || line.include?('deny')
|
|
69
|
+
rule = line.split(' ')
|
|
70
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
71
|
+
end
|
|
21
72
|
end
|
|
22
73
|
end
|
|
23
74
|
table.delete(nil)
|
data/document/acl-M6000-18S.md
CHANGED
|
@@ -3,21 +3,72 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['M6000-18S', 'ACL']
|
|
6
|
+
@sign << ['M6000-18S', 'ACL6']
|
|
7
|
+
@sign << ['M6000-18S', 'LinkACL']
|
|
6
8
|
|
|
7
9
|
module M6000_18S
|
|
8
10
|
module_function
|
|
9
11
|
|
|
10
|
-
def ACL config
|
|
12
|
+
def ACL config, mode=:config # or :text
|
|
11
13
|
table = {}
|
|
12
14
|
name = nil
|
|
13
15
|
config.split("\n").each do|line|
|
|
14
16
|
name = line.split('ipv4-access-list')[1].strip if line.include?('ipv4-access-list')
|
|
17
|
+
table[name] ||= {}
|
|
18
|
+
if mode==:config
|
|
19
|
+
if line.include?('rule')
|
|
20
|
+
rule = line.split(' ')
|
|
21
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
22
|
+
end
|
|
23
|
+
elsif mode==:text
|
|
24
|
+
if line.include?('permit') || line.include?('deny')
|
|
25
|
+
rule = line.split(' ')
|
|
26
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
table.delete(nil)
|
|
31
|
+
return table
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def ACL6 config, mode=:config # or :text
|
|
35
|
+
table = {}
|
|
36
|
+
name = nil
|
|
37
|
+
config.split("\n").each do|line|
|
|
15
38
|
name = line.split('ipv6-access-list')[1].strip if line.include?('ipv6-access-list')
|
|
39
|
+
table[name] ||= {}
|
|
40
|
+
if mode==:config
|
|
41
|
+
if line.include?('rule')
|
|
42
|
+
rule = line.split(' ')
|
|
43
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
44
|
+
end
|
|
45
|
+
elsif mode==:text
|
|
46
|
+
if line.include?('permit') || line.include?('deny')
|
|
47
|
+
rule = line.split(' ')
|
|
48
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
table.delete(nil)
|
|
53
|
+
return table
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def LinkACL config, mode=:config # or :text
|
|
57
|
+
table = {}
|
|
58
|
+
name = nil
|
|
59
|
+
config.split("\n").each do|line|
|
|
16
60
|
name = line.split('link-access-list')[1].strip if line.include?('link-access-list')
|
|
17
61
|
table[name] ||= {}
|
|
18
|
-
if
|
|
19
|
-
|
|
20
|
-
|
|
62
|
+
if mode==:config
|
|
63
|
+
if line.include?('rule')
|
|
64
|
+
rule = line.split(' ')
|
|
65
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
66
|
+
end
|
|
67
|
+
elsif mode==:text
|
|
68
|
+
if line.include?('permit') || line.include?('deny')
|
|
69
|
+
rule = line.split(' ')
|
|
70
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
71
|
+
end
|
|
21
72
|
end
|
|
22
73
|
end
|
|
23
74
|
table.delete(nil)
|
data/document/acl-M6000-8.md
CHANGED
|
@@ -3,21 +3,72 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['M6000-8', 'ACL']
|
|
6
|
+
@sign << ['M6000-8', 'ACL6']
|
|
7
|
+
@sign << ['M6000-8', 'LinkACL']
|
|
6
8
|
|
|
7
9
|
module M6000_8
|
|
8
10
|
module_function
|
|
9
11
|
|
|
10
|
-
def ACL config
|
|
12
|
+
def ACL config, mode=:config # or :text
|
|
11
13
|
table = {}
|
|
12
14
|
name = nil
|
|
13
15
|
config.split("\n").each do|line|
|
|
14
16
|
name = line.split('ipv4-access-list')[1].strip if line.include?('ipv4-access-list')
|
|
17
|
+
table[name] ||= {}
|
|
18
|
+
if mode==:config
|
|
19
|
+
if line.include?('rule')
|
|
20
|
+
rule = line.split(' ')
|
|
21
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
22
|
+
end
|
|
23
|
+
elsif mode==:text
|
|
24
|
+
if line.include?('permit') || line.include?('deny')
|
|
25
|
+
rule = line.split(' ')
|
|
26
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
table.delete(nil)
|
|
31
|
+
return table
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def ACL6 config, mode=:config # or :text
|
|
35
|
+
table = {}
|
|
36
|
+
name = nil
|
|
37
|
+
config.split("\n").each do|line|
|
|
15
38
|
name = line.split('ipv6-access-list')[1].strip if line.include?('ipv6-access-list')
|
|
39
|
+
table[name] ||= {}
|
|
40
|
+
if mode==:config
|
|
41
|
+
if line.include?('rule')
|
|
42
|
+
rule = line.split(' ')
|
|
43
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
44
|
+
end
|
|
45
|
+
elsif mode==:text
|
|
46
|
+
if line.include?('permit') || line.include?('deny')
|
|
47
|
+
rule = line.split(' ')
|
|
48
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
table.delete(nil)
|
|
53
|
+
return table
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def LinkACL config, mode=:config # or :text
|
|
57
|
+
table = {}
|
|
58
|
+
name = nil
|
|
59
|
+
config.split("\n").each do|line|
|
|
16
60
|
name = line.split('link-access-list')[1].strip if line.include?('link-access-list')
|
|
17
61
|
table[name] ||= {}
|
|
18
|
-
if
|
|
19
|
-
|
|
20
|
-
|
|
62
|
+
if mode==:config
|
|
63
|
+
if line.include?('rule')
|
|
64
|
+
rule = line.split(' ')
|
|
65
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
66
|
+
end
|
|
67
|
+
elsif mode==:text
|
|
68
|
+
if line.include?('permit') || line.include?('deny')
|
|
69
|
+
rule = line.split(' ')
|
|
70
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
71
|
+
end
|
|
21
72
|
end
|
|
22
73
|
end
|
|
23
74
|
table.delete(nil)
|
data/document/acl-M6000-8E.md
CHANGED
|
@@ -3,21 +3,72 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['M6000-8E', 'ACL']
|
|
6
|
+
@sign << ['M6000-8E', 'ACL6']
|
|
7
|
+
@sign << ['M6000-8E', 'LinkACL']
|
|
6
8
|
|
|
7
9
|
module M6000_8E
|
|
8
10
|
module_function
|
|
9
11
|
|
|
10
|
-
def ACL config
|
|
12
|
+
def ACL config, mode=:config # or :text
|
|
11
13
|
table = {}
|
|
12
14
|
name = nil
|
|
13
15
|
config.split("\n").each do|line|
|
|
14
16
|
name = line.split('ipv4-access-list')[1].strip if line.include?('ipv4-access-list')
|
|
17
|
+
table[name] ||= {}
|
|
18
|
+
if mode==:config
|
|
19
|
+
if line.include?('rule')
|
|
20
|
+
rule = line.split(' ')
|
|
21
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
22
|
+
end
|
|
23
|
+
elsif mode==:text
|
|
24
|
+
if line.include?('permit') || line.include?('deny')
|
|
25
|
+
rule = line.split(' ')
|
|
26
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
table.delete(nil)
|
|
31
|
+
return table
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def ACL6 config, mode=:config # or :text
|
|
35
|
+
table = {}
|
|
36
|
+
name = nil
|
|
37
|
+
config.split("\n").each do|line|
|
|
15
38
|
name = line.split('ipv6-access-list')[1].strip if line.include?('ipv6-access-list')
|
|
39
|
+
table[name] ||= {}
|
|
40
|
+
if mode==:config
|
|
41
|
+
if line.include?('rule')
|
|
42
|
+
rule = line.split(' ')
|
|
43
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
44
|
+
end
|
|
45
|
+
elsif mode==:text
|
|
46
|
+
if line.include?('permit') || line.include?('deny')
|
|
47
|
+
rule = line.split(' ')
|
|
48
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
table.delete(nil)
|
|
53
|
+
return table
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def LinkACL config, mode=:config # or :text
|
|
57
|
+
table = {}
|
|
58
|
+
name = nil
|
|
59
|
+
config.split("\n").each do|line|
|
|
16
60
|
name = line.split('link-access-list')[1].strip if line.include?('link-access-list')
|
|
17
61
|
table[name] ||= {}
|
|
18
|
-
if
|
|
19
|
-
|
|
20
|
-
|
|
62
|
+
if mode==:config
|
|
63
|
+
if line.include?('rule')
|
|
64
|
+
rule = line.split(' ')
|
|
65
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
66
|
+
end
|
|
67
|
+
elsif mode==:text
|
|
68
|
+
if line.include?('permit') || line.include?('deny')
|
|
69
|
+
rule = line.split(' ')
|
|
70
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
71
|
+
end
|
|
21
72
|
end
|
|
22
73
|
end
|
|
23
74
|
table.delete(nil)
|
data/document/acl-NE5000E-20.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['NE5000E-20', 'ACL']
|
|
6
|
+
@sign << ['NE5000E-20', 'ACL6']
|
|
6
7
|
|
|
7
8
|
module NE5000E_20
|
|
8
9
|
module_function
|
|
@@ -11,7 +12,22 @@ module NE5000E_20
|
|
|
11
12
|
table = {}
|
|
12
13
|
number = nil
|
|
13
14
|
config.split("\n").each do|line|
|
|
14
|
-
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
15
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
16
|
+
table[number] ||= {}
|
|
17
|
+
if line.include?('rule')
|
|
18
|
+
rule = line.split(' ')
|
|
19
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
table.delete(nil)
|
|
23
|
+
return table
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def ACL6 config
|
|
27
|
+
table = {}
|
|
28
|
+
number = nil
|
|
29
|
+
config.split("\n").each do|line|
|
|
30
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl ipv6 number')
|
|
15
31
|
table[number] ||= {}
|
|
16
32
|
if line.include?('rule')
|
|
17
33
|
rule = line.split(' ')
|
data/document/acl-NE5000E-X16.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['NE5000E-X16', 'ACL']
|
|
6
|
+
@sign << ['NE5000E-X16', 'ACL6']
|
|
6
7
|
|
|
7
8
|
module NE5000E_X16
|
|
8
9
|
module_function
|
|
@@ -11,7 +12,22 @@ module NE5000E_X16
|
|
|
11
12
|
table = {}
|
|
12
13
|
number = nil
|
|
13
14
|
config.split("\n").each do|line|
|
|
14
|
-
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
15
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
16
|
+
table[number] ||= {}
|
|
17
|
+
if line.include?('rule')
|
|
18
|
+
rule = line.split(' ')
|
|
19
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
table.delete(nil)
|
|
23
|
+
return table
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def ACL6 config
|
|
27
|
+
table = {}
|
|
28
|
+
number = nil
|
|
29
|
+
config.split("\n").each do|line|
|
|
30
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl ipv6 number')
|
|
15
31
|
table[number] ||= {}
|
|
16
32
|
if line.include?('rule')
|
|
17
33
|
rule = line.split(' ')
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
```ruby
|
|
5
5
|
@sign << ['NE5000E-X16A', 'ACL']
|
|
6
|
+
@sign << ['NE5000E-X16A', 'ACL6']
|
|
6
7
|
|
|
7
8
|
module NE5000E_X16A
|
|
8
9
|
module_function
|
|
@@ -11,7 +12,22 @@ module NE5000E_X16A
|
|
|
11
12
|
table = {}
|
|
12
13
|
number = nil
|
|
13
14
|
config.split("\n").each do|line|
|
|
14
|
-
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
15
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl number')
|
|
16
|
+
table[number] ||= {}
|
|
17
|
+
if line.include?('rule')
|
|
18
|
+
rule = line.split(' ')
|
|
19
|
+
table[number][rule[1].to_i] = rule[2..-1]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
table.delete(nil)
|
|
23
|
+
return table
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def ACL6 config
|
|
27
|
+
table = {}
|
|
28
|
+
number = nil
|
|
29
|
+
config.split("\n").each do|line|
|
|
30
|
+
number = line.split('number')[1].strip.to_i if line.include?('acl ipv6 number')
|
|
15
31
|
table[number] ||= {}
|
|
16
32
|
if line.include?('rule')
|
|
17
33
|
rule = line.split(' ')
|
data/document/acl-T8000-18.md
CHANGED
|
@@ -2,21 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
```ruby
|
|
4
4
|
@sign << ['T8000-18', 'ACL']
|
|
5
|
+
@sign << ['T8000-18', 'ACL6']
|
|
6
|
+
@sign << ['T8000-18', 'LinkACL']
|
|
5
7
|
|
|
6
8
|
module T8000_18
|
|
7
9
|
module_function
|
|
8
10
|
|
|
9
|
-
def ACL config
|
|
11
|
+
def ACL config, mode=:config # or :text
|
|
10
12
|
table = {}
|
|
11
13
|
name = nil
|
|
12
14
|
config.split("\n").each do|line|
|
|
13
15
|
name = line.split('ipv4-access-list')[1].strip if line.include?('ipv4-access-list')
|
|
16
|
+
table[name] ||= {}
|
|
17
|
+
if mode==:config
|
|
18
|
+
if line.include?('rule')
|
|
19
|
+
rule = line.split(' ')
|
|
20
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
21
|
+
end
|
|
22
|
+
elsif mode==:text
|
|
23
|
+
if line.include?('permit') || line.include?('deny')
|
|
24
|
+
rule = line.split(' ')
|
|
25
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
table.delete(nil)
|
|
30
|
+
return table
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def ACL6 config, mode=:config # or :text
|
|
34
|
+
table = {}
|
|
35
|
+
name = nil
|
|
36
|
+
config.split("\n").each do|line|
|
|
14
37
|
name = line.split('ipv6-access-list')[1].strip if line.include?('ipv6-access-list')
|
|
38
|
+
table[name] ||= {}
|
|
39
|
+
if mode==:config
|
|
40
|
+
if line.include?('rule')
|
|
41
|
+
rule = line.split(' ')
|
|
42
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
43
|
+
end
|
|
44
|
+
elsif mode==:text
|
|
45
|
+
if line.include?('permit') || line.include?('deny')
|
|
46
|
+
rule = line.split(' ')
|
|
47
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
table.delete(nil)
|
|
52
|
+
return table
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def LinkACL config, mode=:config # or :text
|
|
56
|
+
table = {}
|
|
57
|
+
name = nil
|
|
58
|
+
config.split("\n").each do|line|
|
|
15
59
|
name = line.split('link-access-list')[1].strip if line.include?('link-access-list')
|
|
16
60
|
table[name] ||= {}
|
|
17
|
-
if
|
|
18
|
-
|
|
19
|
-
|
|
61
|
+
if mode==:config
|
|
62
|
+
if line.include?('rule')
|
|
63
|
+
rule = line.split(' ')
|
|
64
|
+
table[name][rule[1].to_i] = rule[2..-1]
|
|
65
|
+
end
|
|
66
|
+
elsif mode==:text
|
|
67
|
+
if line.include?('permit') || line.include?('deny')
|
|
68
|
+
rule = line.split(' ')
|
|
69
|
+
table[name][rule[0].to_i] = rule[1..-1]
|
|
70
|
+
end
|
|
20
71
|
end
|
|
21
72
|
end
|
|
22
73
|
table.delete(nil)
|
data/document/telnet.md
CHANGED
|
@@ -209,6 +209,17 @@ module NE5000E_20
|
|
|
209
209
|
end
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
+
```ruby
|
|
213
|
+
@sign << ['VNE9000', 'telnet']
|
|
214
|
+
|
|
215
|
+
module VNE9000
|
|
216
|
+
def setting
|
|
217
|
+
@selectors = {" ---- More ----"=>' ',"Are you sure to display some information?(Y/N)[Y]:"=>'y'}
|
|
218
|
+
@erasers << " ---- More ----" << "[16D [16D" << " \x1b[1D" << "[16D [16D"
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
```
|
|
222
|
+
|
|
212
223
|
```ruby
|
|
213
224
|
@sign << ['NE8000E-X8', 'telnet']
|
|
214
225
|
|
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.62
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt
|
|
@@ -48,6 +48,10 @@ files:
|
|
|
48
48
|
- GEMFILE
|
|
49
49
|
- LICENSE
|
|
50
50
|
- README.md
|
|
51
|
+
- document/acl-CR16010H-F.md
|
|
52
|
+
- document/acl-CR16018-F.md
|
|
53
|
+
- document/acl-CR19000-20.md
|
|
54
|
+
- document/acl-CRS-16.md
|
|
51
55
|
- document/acl-M6000-16E.md
|
|
52
56
|
- document/acl-M6000-18S.md
|
|
53
57
|
- document/acl-M6000-8.md
|