network-utility 1.1.33 → 1.1.34

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/document/config.md +38 -38
  3. data/network.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ec510299d8eff2a5f6b035dfabfdf58c59cda3fb7d104316bb40f84b264eb15
4
- data.tar.gz: 69d3ca5ad3d9f06070ce84719af37d47032472799d1a1c0c9fd01814ef2363f1
3
+ metadata.gz: 50d1777bb5c45279d6c89a58090782da20eac56854a5cbe8f60cd6001fe841ca
4
+ data.tar.gz: 03a22af38e0dbef4e4cf8517d3d150aa73f266b9755b99b5bea9b3cad3116243
5
5
  SHA512:
6
- metadata.gz: 705bf98e0e807e21685e9ca8ec7d566370ba83e48f98ffeb2209ee395ccbf31229a4558ad8264ad90180da869ec99946045f20749ed0fa701af1eea411987ddd
7
- data.tar.gz: 6e5032cdffdd265c95562fa3f7e92f3eb57407ae9de593fd1733a0eb2accc0514e3f3562bcb1275548eb9c77c14a568ab4be2b495b622580ac9bbe1cf450a3fe
6
+ metadata.gz: 2ff2532ca1192170219d5157748a9fe48c8fd6f6a9e0098e126af0840bb157368b443f9b61ac59a5a516160fab800914cec47744921d801cd9a9bd2584dd89af
7
+ data.tar.gz: a9c7ab1c3349c7951515db15708cdcc4dc8e816db3390334bceb0a7772cacad2b7eda62686b1ccefa2dc90e41b3f225c2323cc4de9c7353280f603974e2c2642
data/document/config.md CHANGED
@@ -335,11 +335,11 @@ module ME60_X16
335
335
  end
336
336
  cfg = {}
337
337
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
338
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
339
- prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
340
- return cfg unless prepart
341
- content = prepart.split(/<#{hostname}>( )*/)[0]
342
- content = prepart.split("\nreturn")[0] unless content
338
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
339
+ # prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
340
+ # return cfg unless prepart
341
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
342
+ # content = prepart.split("\nreturn")[0] unless content
343
343
  pretent = "\n"+content
344
344
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
345
345
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -376,9 +376,9 @@ module NE40E_X8
376
376
  end
377
377
  cfg = {}
378
378
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
379
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
380
- return cfg unless prepart
381
- content = prepart.split(/<#{hostname}>( )*\n/)[0]
379
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
380
+ # return cfg unless prepart
381
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
382
382
  pretent = "\n"+content
383
383
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
384
384
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -415,11 +415,11 @@ module NE40E_X16
415
415
  end
416
416
  cfg = {}
417
417
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
418
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
419
- prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
420
- return cfg unless prepart
421
- content = prepart.split(/<#{hostname}>( )*/)[0]
422
- content = prepart.split("\nreturn")[0] unless content
418
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
419
+ # prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
420
+ # return cfg unless prepart
421
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
422
+ # content = prepart.split("\nreturn")[0] unless content
423
423
  pretent = "\n"+content
424
424
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
425
425
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -496,9 +496,9 @@ module NE5000E_X16
496
496
  end
497
497
  cfg = {}
498
498
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
499
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
500
- return cfg unless prepart
501
- content = prepart.split(/<#{hostname}>( )*\n/)[0]
499
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
500
+ # return cfg unless prepart
501
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
502
502
  pretent = "\n"+content
503
503
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
504
504
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -536,9 +536,9 @@ module NE5000E_X16A
536
536
  end
537
537
  cfg = {}
538
538
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
539
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
540
- return cfg unless prepart
541
- content = prepart.split(/<#{hostname}>( )*\n/)[0]
539
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
540
+ # return cfg unless prepart
541
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
542
542
  pretent = "\n"+content
543
543
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
544
544
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -938,9 +938,9 @@ module M6000_16E
938
938
  end
939
939
  raw = newraw.join("\n")
940
940
  hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
941
- prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
942
- prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
943
- return cfg unless prepart
941
+ # prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
942
+ # prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
943
+ # return cfg unless prepart
944
944
  content = self.preprocess(raw)#prepart.split(/#{hostname}#( )*\n/)[0]
945
945
  begin
946
946
  XmlParser.parse("<root>#{content}</root>").elements.each do|element|
@@ -998,9 +998,9 @@ module M6000_18S
998
998
  end
999
999
  raw = newraw.join("\n")
1000
1000
  hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
1001
- prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
1002
- prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
1003
- return cfg unless prepart
1001
+ # prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
1002
+ # prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
1003
+ # return cfg unless prepart
1004
1004
  content = self.preprocess(raw)#prepart.split(/#{hostname}#( )*\n/)[0]
1005
1005
  begin
1006
1006
  XmlParser.parse("<root>#{content}</root>").elements.each do|element|
@@ -1058,9 +1058,9 @@ module T8000_18
1058
1058
  end
1059
1059
  raw = newraw.join("\n")
1060
1060
  hostname = guards[0] || self.preprocess(raw).split("\n").find{|line|line.include?("hostname ")}.to_s.split("hostname ")[1]
1061
- prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
1062
- prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
1063
- return cfg unless prepart
1061
+ # prepart = self.preprocess(raw).split(/#{hostname}#( )*show running-config( )*\n/)[1]
1062
+ # prepart = self.preprocess(raw).split("show running-config\n")[1].split("<<<<")[0] unless prepart # ssh >>>>
1063
+ # return cfg unless prepart
1064
1064
  content = self.preprocess(raw)#prepart.split(/#{hostname}#( )*\n/)[0]
1065
1065
  begin
1066
1066
  XmlParser.parse("<root>#{content}</root>").elements.each do|element|
@@ -1275,11 +1275,11 @@ module CR16010H_F
1275
1275
  end
1276
1276
  cfg = {}
1277
1277
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
1278
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
1279
- prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
1280
- return cfg unless prepart
1281
- content = prepart.split(/<#{hostname}>( )*/)[0]
1282
- content = prepart.split("\nreturn")[0] unless content
1278
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
1279
+ # prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
1280
+ # return cfg unless prepart
1281
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
1282
+ # content = prepart.split("\nreturn")[0] unless content
1283
1283
  pretent = "\n"+content
1284
1284
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
1285
1285
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -1312,11 +1312,11 @@ module CR16018_F
1312
1312
  end
1313
1313
  cfg = {}
1314
1314
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
1315
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
1316
- prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
1317
- return cfg unless prepart
1318
- content = prepart.split(/<#{hostname}>( )*/)[0]
1319
- content = prepart.split("\nreturn")[0] unless content
1315
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
1316
+ # prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
1317
+ # return cfg unless prepart
1318
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
1319
+ # content = prepart.split("\nreturn")[0] unless content
1320
1320
  pretent = "\n"+content
1321
1321
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
1322
1322
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
data/network.rb CHANGED
@@ -22,5 +22,5 @@
22
22
  ].each{|mod|require mod}
23
23
 
24
24
  module Network
25
- VERSION = '1.1.33'
25
+ VERSION = '1.1.34'
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.33
4
+ version: 1.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt