brocadesan 0.4.8 → 0.4.10

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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OWQzNDA4YmVhZmJiYzgxZWMyYjRjYTRjZmFkZWJmOTljMDQwNGQzNQ==
5
- data.tar.gz: !binary |-
6
- MDM5MGY3YWUyOTQ1OGNkYTI3MjY1MmQ5ZDdmM2U1ZjY5YTkzYmY3MA==
2
+ SHA1:
3
+ metadata.gz: 83e5452a14a22fc372b41c3594719280f766442c
4
+ data.tar.gz: 9fb64a9e8c4535d0054837b7989b00e41df3ef52
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MmUxN2I2ZDdmNjg5MzA1OTdlYTRkZjMxNmEyNDFjZDYzMzgwNjc3ZDQ1NGUx
10
- ODIzNDA5YjdkYjFiYzE3ZWU1YjhlYTNjZjIwZjEzODUxMGQ2YzVjMmJiYTQ2
11
- ZjU4NTAzNjMyMjNhMjI5ZGRiMTNlYThjYTlhOTc5ODU3NTVhNWM=
12
- data.tar.gz: !binary |-
13
- M2YwYTczYTRiZTBiZjVmNDhiOTNkMDM3NzZiZjliYzk5NjkwNzQzMDA4YTM2
14
- YjIwNzE3MzM5NmIzYjVjMWIyMTBjYjNkNzY2NTM3NTkyYWRjN2VjODMwZDcw
15
- OTBhZGExMWI2MzAzNGE2ZGNkNjEwYTBlNjc3OTY2YTNlMTUwYWU=
6
+ metadata.gz: a6572095f76c3e7dca60b2c44b39a5a966b22919bcc587ede00e183d6c4324b7888ef80db8026f5b4e514087b3d36aae8ebfc9c78a9e48354eb66ad34d318d66
7
+ data.tar.gz: 71b5ad408493e27c3931280e788a8bac008116fb914ca7d03a8ceaba487ea6e5939f3b2b5ebb7897bcc8382a7e168aade847e1ec14b740168e0a8cb7be0f34c1
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rake/testtask'
2
- require 'rake/notes/rake_task'
2
+ #require 'rake/notes/rake_task'
3
3
  require 'rdoc/task'
4
4
  require 'yaml'
5
5
 
data/brocadesan.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'brocadesan'
3
- s.version = '0.4.8'
4
- s.date = '2016-02-26'
3
+ s.version = '0.4.10'
4
+ s.date = '2022-02-14'
5
5
  s.summary = "Brocade SAN library"
6
6
  s.description = "Gem to manipulate FABOS based devices"
7
7
  s.authors = ["Tomas Trnecka"]
@@ -81,7 +81,7 @@
81
81
  :dls:
82
82
  :cmd: "dlsshow"
83
83
  :attr: dlsshow
84
- :format: string
84
+ :format: array
85
85
  :iod:
86
86
  :cmd: "iodshow"
87
87
  :attr: iodshow
@@ -4,7 +4,7 @@
4
4
  :lscfg: simple
5
5
  :aptpolicy: simple
6
6
  :chassisname: oneline
7
- :dlsshow: oneline
7
+ :dlsshow: simple
8
8
  :iodshow: oneline
9
9
  :switchstatusshow: multiline
10
10
  :mapsdb: multiline
@@ -412,16 +412,18 @@ module SAN
412
412
 
413
413
 
414
414
  # storing defined
415
- @configuration[:defined_configuration][:cfg].each do |config,members|
416
-
417
- effective = @configuration[:effective_configuration][:cfg].keys[0]==config ? true : false
418
-
419
- cfg=ZoneConfiguration.new(config,:effective=>effective)
420
- members.each do |member|
421
- cfg.add_member member
415
+ if !@configuration[:defined_configuration][:cfg].nil?
416
+ @configuration[:defined_configuration][:cfg].each do |config,members|
417
+
418
+ effective = @configuration[:effective_configuration][:cfg].keys[0]==config ? true : false
419
+
420
+ cfg=ZoneConfiguration.new(config,:effective=>effective)
421
+ members.each do |member|
422
+ cfg.add_member member
423
+ end
424
+
425
+ tmp_cfg[:zone_configurations]<<cfg
422
426
  end
423
-
424
- tmp_cfg[:zone_configurations]<<cfg
425
427
  end
426
428
 
427
429
  if full
@@ -575,7 +577,7 @@ module SAN
575
577
 
576
578
  def parse_line(line)
577
579
  return if line.empty?
578
- # we detect which command output we parse - commands start with defined prompt on the XML line
580
+ # we detect which command output we parse - commands start with defined prompt on the CMD line
579
581
  @parsed[:parsing_position] = case
580
582
  # stripping fosexec, all pipes and ' to get pure command
581
583
  when line.match(/^#{@prompt}/) then line.gsub(/(fosexec --fid \d+ -cmd \')|\'$|\' \|.*$/,"").split(" ")[1]
@@ -655,6 +657,8 @@ module SAN
655
657
  @parsed[:cfg_transaction][:id] = $1
656
658
  when line.match(/It is(.+)abortable$/) && @parsed[:parsing_position]=="cfgtransshow"
657
659
  @parsed[:cfg_transaction][:abortable] = $1.match(/not/) ? false : true
660
+ # FOS 9 fosexec is adding some more output lines
661
+ when line.match("-----") || line.match(@parsed[:parsing_position])
658
662
  else
659
663
  #supportshow
660
664
  @parsed[@parsed[:parsing_position].to_sym]||=""
@@ -737,6 +741,9 @@ module SAN
737
741
  :qos => l[8..-1].include?("QOS"),
738
742
  :cr_recov => l[8..-1].include?("CR_RECOV")
739
743
  }
744
+ when line.match("DLS is") || line.match("E_Port Balance")
745
+ @parsed[@parsed[:parsing_position].to_sym]||=[]
746
+ @parsed[@parsed[:parsing_position].to_sym]<<line
740
747
  #default handling if it doesno match specialized match
741
748
  # parse lines formated like
742
749
  # param: value
@@ -871,6 +878,7 @@ module SAN
871
878
  # trunk parser
872
879
  def parse_trunk(line)
873
880
  return if line.match(/No trunking/i)
881
+ return if !line.match(/->/)
874
882
  @parsed[:trunk_links]||=[]
875
883
  l_tricky, l_simple = line.split("->")
876
884
  l_t = l_tricky.split(":")
data/lib/meta_methods.rb CHANGED
@@ -215,12 +215,30 @@ class Brocade::SAN::Switch
215
215
  #
216
216
  # Returns value in (string) format
217
217
 
218
+ ##
219
+ # :method: maps_status
220
+ # :call-seq:
221
+ # maps_status(forced=true)
222
+ #
223
+ # If called with +true+ argument it will get the current_switch_policy_status from the switch instead of cache
224
+ #
225
+ # Returns value in (string) format
226
+
227
+ ##
228
+ # :method: maps_status_details
229
+ # :call-seq:
230
+ # maps_status_details(forced=true)
231
+ #
232
+ # If called with +true+ argument it will get the maps_summary from the switch instead of cache
233
+ #
234
+ # Returns value in (string) format
235
+
218
236
  ##
219
237
  # :method: ip
220
238
  # :call-seq:
221
239
  # ip(forced=true)
222
240
  #
223
- # If called with +true+ argument it will get the ip_address from the switch instead of cache
241
+ # If called with +true+ argument it will get the ethernet_ip_address from the switch instead of cache
224
242
  #
225
243
  # Returns value in (string) format
226
244
 
@@ -1,4 +1,10 @@
1
1
  > agshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "agshow" on FID 128:
6
+
7
+
2
8
  Worldwide Name Ports Enet IP Addr Firmware Local/Remote Name
3
9
  ------------------------------------------------------------------------------------------------------
4
10
  10:00:00:11:0a:00:84:a2 24 15.84.68.94 v6.1.0_uth8 remote VCFC2CN8314D00X
@@ -1,4 +1,9 @@
1
1
  > aptpolicy
2
+
3
+ ---------------------------------------------------
4
+
5
+ "aptpolicy" on FID 128:
6
+
2
7
  Current Policy: 3
3
8
 
4
9
  3 : Default Policy
@@ -1,2 +1,6 @@
1
1
  > cfgtransshow
2
+ ---------------------------------------------------
3
+
4
+ "cfgtransshow" on FID 128:
5
+
2
6
  There is no outstanding zoning transaction
@@ -1,2 +1,7 @@
1
1
  > chassisname
2
+
3
+ ---------------------------------------------------
4
+
5
+ "chassisname" on FID 128:
6
+
2
7
  IDAA1C01_chass
@@ -1,4 +1,13 @@
1
1
  > dlsshow
2
2
 
3
- DLS is set by default with current routing policy
3
+ ---------------------------------------------------
4
+
5
+ "dlsshow" on FID 128:
6
+
7
+
8
+ DLS is set with Lossless enabled, Two-hop Lossless disabled
9
+
10
+
11
+ E_Port Balance Priority is not set
12
+
4
13
 
@@ -1,4 +1,4 @@
1
- :dlsshow: 'DLS is set by default with current routing policy'
1
+ :dlsshow: ["DLS is set with Lossless enabled, Two-hop Lossless disabled", "E_Port Balance Priority is not set"]
2
2
  :parsing_position: end
3
3
 
4
4
 
@@ -1,4 +1,8 @@
1
1
  > dlsshow
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "dlsshow" on FID 128:
6
+
3
7
  DLS is not set
4
8
 
@@ -1,4 +1,4 @@
1
- :dlsshow: 'DLS is not set'
1
+ :dlsshow: ["DLS is not set"]
2
2
  :parsing_position: end
3
3
 
4
4
 
@@ -1,3 +1,8 @@
1
1
  > fabricprincipal
2
+
3
+ ---------------------------------------------------
4
+
5
+ "fabricprincipal" on FID 128:
6
+
2
7
  Principal Selection Mode: Enable
3
8
  Principal Switch Selection Priority: 0x1
@@ -1,4 +1,9 @@
1
1
  > fabricshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "fabricshow" on FID 128:
6
+
2
7
  Switch ID Worldwide Name Enet IP Addr FC IP Addr Name
3
8
  -------------------------------------------------------------------------
4
9
  1: fffc01 10:00:00:05:1e:4c:24:00 15.187.118.17 0.0.0.0 >"IDAA1C01"
@@ -7,4 +12,4 @@ Switch ID Worldwide Name Enet IP Addr FC IP Addr Name
7
12
  132: fffc84 10:00:00:05:33:25:12:00 15.187.119.38 0.0.0.0 "GREA1C02"
8
13
 
9
14
  The Fabric has 4 switches
10
-
15
+ Fabric Name: ENV2 VPC Lab - Fab B
@@ -31,4 +31,5 @@
31
31
  :eth_ip: 15.187.119.38
32
32
  :fc_ip: 0.0.0.0
33
33
  :name: GREA1C02
34
- :local: false
34
+ :local: false
35
+ :fabric_name: "ENV2 VPC Lab - Fab B"
@@ -1,4 +1,9 @@
1
1
  > iodshow
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "iodshow" on FID 128:
6
+
7
+
3
8
  IOD is set
4
9
 
@@ -1,5 +1,9 @@
1
1
  > ipaddrshow
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "ipaddrshow" on FID 128:
6
+
3
7
  SWITCH
4
8
  Ethernet IP Address: 10.200.1.112
5
9
  Ethernet Subnetmask: 255.255.0.0
@@ -1,5 +1,9 @@
1
1
  > ipaddrshow
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "ipaddrshow" on FID 128:
6
+
3
7
  CHASSIS
4
8
  Ethernet IP Address: 10.200.0.153
5
9
  Ethernet Subnetmask: 255.255.0.0
@@ -1,4 +1,9 @@
1
1
  > islshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "islshow" on FID 128:
6
+
2
7
  1: 0-> 0 10:00:00:05:33:23:86:00 1 H2C04R065-U03-A sp: 8.000G bw: 64.000G TRUNK QOS
3
8
  2: 8-> 17 10:00:00:05:33:c6:f7:23 29 H4C11R218-U02-I sp: 8.000G bw: 8.000G
4
9
  17: 32-> 64 10:00:00:27:f8:34:f7:00 41 DXS-898-U03-A01 sp: 4.000G bw: 4.000G CR_RECOV
@@ -1,2 +1,7 @@
1
1
  > islshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "islshow" on FID 128:
6
+
2
7
  No ISL found
@@ -1,5 +1,10 @@
1
1
  > lscfg --show
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "lscfg" on FID 128:
6
+
7
+
3
8
  Created switches: 128(ds) 99
4
9
  Slot 1 2 3 4 5 6 7 8 9 10 11 12
5
10
  -------------------------------------------------------------------------------
@@ -1,5 +1,10 @@
1
1
  > mapsdb --show
2
2
 
3
+ ---------------------------------------------------
4
+
5
+ "mapsdb" on FID 128:
6
+
7
+
3
8
  1 Dashboard Information:
4
9
  =======================
5
10
 
@@ -78,3 +78,8 @@ Switch entry for 129
78
78
  Device Shared in Other AD: No
79
79
  Redirect: No
80
80
  Partial: No
81
+ The Local Name Server has 62 entries }
82
+ ---------------------------------------------------
83
+
84
+ "nsshow" on FID 128:
85
+
@@ -34,4 +34,9 @@
34
34
  Partial: No
35
35
  > nscamshow -t
36
36
  nscam show for remote switches:
37
- No entry is found!
37
+ No entry is found!
38
+
39
+ ---------------------------------------------------
40
+
41
+ "nscamshow" on FID 128:
42
+
@@ -1,4 +1,9 @@
1
1
  > switchshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "switchshow" on FID 128:
6
+
2
7
  switchName: IDAA1C01
3
8
  switchType: 62.3
4
9
  switchState: Online
@@ -1,4 +1,9 @@
1
1
  > switchshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "switchshow" on FID 128:
6
+
2
7
  switchName: H4C11R218-U02-ICB04
3
8
  switchType: 72.3
4
9
  switchState: Online
@@ -1,4 +1,9 @@
1
1
  > switchshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "switchshow" on FID 128:
6
+
2
7
  switchName: H4C13R253-U02-ICB03
3
8
  switchType: 72.3
4
9
  switchState: Online
@@ -1,4 +1,9 @@
1
1
  > trunkshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "trunkshow" on FID 128:
6
+
2
7
  1: 0-> 0 10:00:00:05:33:23:86:00 1 deskew 149 MASTER
3
8
  1-> 1 10:00:00:05:33:23:86:00 1 deskew 15
4
9
  6->116 10:00:00:05:33:9b:d2:00 2 deskew 96
@@ -1,2 +1,7 @@
1
1
  > trunkshow
2
+
3
+ ---------------------------------------------------
4
+
5
+ "trunkshow" on FID 128:
6
+
2
7
  No trunking links
@@ -1,4 +1,9 @@
1
1
  > version
2
+
3
+ ---------------------------------------------------
4
+
5
+ "version" on FID 128:
6
+
2
7
  Kernel: 2.6.14.2
3
8
  Fabric OS: v6.4.3b
4
9
  Made on: Tue Sep 4 22:03:15 2012
@@ -1,4 +1,9 @@
1
1
  > fosexec --fid 99 -cmd 'switchshow'
2
+
3
+ ---------------------------------------------------
4
+
5
+ "switchshow" on FID 128:
6
+
2
7
  switchName: IDAA1C01
3
8
  switchType: 62.3
4
9
  switchState: Online
data/test/switch_test.rb CHANGED
@@ -513,4 +513,8 @@ class SwitchResponseTest < MiniTest::Test
513
513
  end
514
514
  end
515
515
 
516
- end; end
516
+ end; end
517
+
518
+ class TestDevice
519
+ include SshDevice
520
+ end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brocadesan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Trnecka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-notes
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.2'
55
55
  description: Gem to manipulate FABOS based devices
@@ -157,17 +157,17 @@ require_paths:
157
157
  - lib
158
158
  required_ruby_version: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - ! '>='
160
+ - - ">="
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ! '>='
165
+ - - ">="
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.3.0
170
+ rubygems_version: 2.4.5.2
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Brocade SAN library