network-utility 1.1.12 → 1.1.13
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 +99 -0
- 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: 6c586485e73f111a4d97a63861d9151c335de1cdbec2971396f517cd4fb6bae0
|
4
|
+
data.tar.gz: 0b8f163cb60fedd93ce1a41d35b782cfe18d5afb3b5155bd9806f674c2e210df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccd175396fd40c01771ee156bf44546a0eebf313b09179678dd15357028507775f17599b6b71d5638a05cf9e4165098a732e4f7c2ef7d82253cc1ae3627f74e7
|
7
|
+
data.tar.gz: d152e15d604b7d4287296ccd62d01021f5dc028a04187f5f32680b2e125593404ed63bc72d7462e158e03f524593fe8a807ef9c2dbcdba7e68fd4fdd9278630c
|
data/document/config.md
CHANGED
@@ -688,6 +688,17 @@ module M6000
|
|
688
688
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
689
689
|
# prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
690
690
|
# return cfg unless prepart
|
691
|
+
newraw = []; flag = false
|
692
|
+
raw.split("\n").each_with_index do|line,index|
|
693
|
+
if line.size==80
|
694
|
+
newraw << line
|
695
|
+
flag = true
|
696
|
+
elsif flag
|
697
|
+
newraw[-1] = newraw[-1] + line
|
698
|
+
flag = line.size==80
|
699
|
+
end
|
700
|
+
end
|
701
|
+
raw = newraw
|
691
702
|
content = self.preprocess(raw)#prepart.split(/#{hostname}#( )*\n/)[0]
|
692
703
|
|
693
704
|
begin
|
@@ -727,6 +738,17 @@ module M6000_8
|
|
727
738
|
|
728
739
|
def 配置解析 raw,*guards
|
729
740
|
cfg = {}
|
741
|
+
newraw = []; flag = false
|
742
|
+
raw.split("\n").each_with_index do|line,index|
|
743
|
+
if line.size==80
|
744
|
+
newraw << line
|
745
|
+
flag = true
|
746
|
+
elsif flag
|
747
|
+
newraw[-1] = newraw[-1] + line
|
748
|
+
flag = line.size==80
|
749
|
+
end
|
750
|
+
end
|
751
|
+
raw = newraw
|
730
752
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
731
753
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
732
754
|
return cfg unless prepart
|
@@ -768,6 +790,17 @@ module M6000_8E
|
|
768
790
|
|
769
791
|
def 配置解析 raw,*guards
|
770
792
|
cfg = {}
|
793
|
+
newraw = []; flag = false
|
794
|
+
raw.split("\n").each_with_index do|line,index|
|
795
|
+
if line.size==80
|
796
|
+
newraw << line
|
797
|
+
flag = true
|
798
|
+
elsif flag
|
799
|
+
newraw[-1] = newraw[-1] + line
|
800
|
+
flag = line.size==80
|
801
|
+
end
|
802
|
+
end
|
803
|
+
raw = newraw
|
771
804
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
772
805
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
773
806
|
return cfg unless prepart
|
@@ -810,6 +843,17 @@ module M6000_16E
|
|
810
843
|
|
811
844
|
def 配置解析 raw,*guards
|
812
845
|
cfg = {}
|
846
|
+
newraw = []; flag = false
|
847
|
+
raw.split("\n").each_with_index do|line,index|
|
848
|
+
if line.size==80
|
849
|
+
newraw << line
|
850
|
+
flag = true
|
851
|
+
elsif flag
|
852
|
+
newraw[-1] = newraw[-1] + line
|
853
|
+
flag = line.size==80
|
854
|
+
end
|
855
|
+
end
|
856
|
+
raw = newraw
|
813
857
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
814
858
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
815
859
|
return cfg unless prepart
|
@@ -851,6 +895,17 @@ module M6000_18S
|
|
851
895
|
|
852
896
|
def 配置解析 raw,*guards
|
853
897
|
cfg = {}
|
898
|
+
newraw = []; flag = false
|
899
|
+
raw.split("\n").each_with_index do|line,index|
|
900
|
+
if line.size==80
|
901
|
+
newraw << line
|
902
|
+
flag = true
|
903
|
+
elsif flag
|
904
|
+
newraw[-1] = newraw[-1] + line
|
905
|
+
flag = line.size==80
|
906
|
+
end
|
907
|
+
end
|
908
|
+
raw = newraw
|
854
909
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
855
910
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
856
911
|
return cfg unless prepart
|
@@ -893,6 +948,17 @@ module T8000_18
|
|
893
948
|
|
894
949
|
def 配置解析 raw,*guards
|
895
950
|
cfg = {}
|
951
|
+
newraw = []; flag = false
|
952
|
+
raw.split("\n").each_with_index do|line,index|
|
953
|
+
if line.size==80
|
954
|
+
newraw << line
|
955
|
+
flag = true
|
956
|
+
elsif flag
|
957
|
+
newraw[-1] = newraw[-1] + line
|
958
|
+
flag = line.size==80
|
959
|
+
end
|
960
|
+
end
|
961
|
+
raw = newraw
|
896
962
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
897
963
|
prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
898
964
|
return cfg unless prepart
|
@@ -935,6 +1001,17 @@ module ZXCTN9000_8EA
|
|
935
1001
|
|
936
1002
|
def 配置解析 raw,*guards
|
937
1003
|
cfg = {}
|
1004
|
+
newraw = []; flag = false
|
1005
|
+
raw.split("\n").each_with_index do|line,index|
|
1006
|
+
if line.size==80
|
1007
|
+
newraw << line
|
1008
|
+
flag = true
|
1009
|
+
elsif flag
|
1010
|
+
newraw[-1] = newraw[-1] + line
|
1011
|
+
flag = line.size==80
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
raw = newraw
|
938
1015
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
939
1016
|
# prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
940
1017
|
# return cfg unless prepart
|
@@ -977,6 +1054,17 @@ module ZXCTN9000_18EA
|
|
977
1054
|
|
978
1055
|
def 配置解析 raw,*guards
|
979
1056
|
cfg = {}
|
1057
|
+
newraw = []; flag = false
|
1058
|
+
raw.split("\n").each_with_index do|line,index|
|
1059
|
+
if line.size==80
|
1060
|
+
newraw << line
|
1061
|
+
flag = true
|
1062
|
+
elsif flag
|
1063
|
+
newraw[-1] = newraw[-1] + line
|
1064
|
+
flag = line.size==80
|
1065
|
+
end
|
1066
|
+
end
|
1067
|
+
raw = newraw
|
980
1068
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
981
1069
|
# prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
982
1070
|
# return cfg unless prepart
|
@@ -1019,6 +1107,17 @@ module V6000
|
|
1019
1107
|
|
1020
1108
|
def 配置解析 raw,*guards
|
1021
1109
|
cfg = {}
|
1110
|
+
newraw = []; flag = false
|
1111
|
+
raw.split("\n").each_with_index do|line,index|
|
1112
|
+
if line.size==80
|
1113
|
+
newraw << line
|
1114
|
+
flag = true
|
1115
|
+
elsif flag
|
1116
|
+
newraw[-1] = newraw[-1] + line
|
1117
|
+
flag = line.size==80
|
1118
|
+
end
|
1119
|
+
end
|
1120
|
+
raw = newraw
|
1022
1121
|
hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
|
1023
1122
|
# prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
|
1024
1123
|
# return cfg unless prepart
|
data/network.rb
CHANGED