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 +5 -13
- data/Rakefile +1 -1
- data/brocadesan.gemspec +2 -2
- data/lib/brocadesan/config/brocade/san/switch_cmd_mapping.yml +1 -1
- data/lib/brocadesan/config/parser_mapping.yml +1 -1
- data/lib/brocadesan/switch.rb +18 -10
- data/lib/meta_methods.rb +19 -1
- data/test/outputs/agshow_1.txt +6 -0
- data/test/outputs/apt_policy_1.txt +5 -0
- data/test/outputs/cfgtransshow_1.txt +4 -0
- data/test/outputs/chassisname_1.txt +5 -0
- data/test/outputs/dlsshow_1.txt +10 -1
- data/test/outputs/dlsshow_1.yml +1 -1
- data/test/outputs/dlsshow_2.txt +4 -0
- data/test/outputs/dlsshow_2.yml +1 -1
- data/test/outputs/fabricprincipal_1.txt +5 -0
- data/test/outputs/fabricshow_1.txt +6 -1
- data/test/outputs/fabricshow_1.yml +2 -1
- data/test/outputs/iodshow_1.txt +5 -0
- data/test/outputs/ipaddrshow_1.txt +4 -0
- data/test/outputs/ipaddrshow_2.txt +4 -0
- data/test/outputs/islshow_1.txt +5 -0
- data/test/outputs/islshow_2.txt +5 -0
- data/test/outputs/lscfg_show_1.txt +5 -0
- data/test/outputs/mapsdbshow_1.txt +5 -0
- data/test/outputs/ns_1.txt +5 -0
- data/test/outputs/ns_2.txt +6 -1
- data/test/outputs/switch_1.txt +5 -0
- data/test/outputs/switch_2.txt +5 -0
- data/test/outputs/switch_3.txt +5 -0
- data/test/outputs/trunkshow_1.txt +5 -0
- data/test/outputs/trunkshow_2.txt +5 -0
- data/test/outputs/version_1.txt +5 -0
- data/test/outputs/vf_switch_1.txt +5 -0
- data/test/switch_test.rb +5 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDM5MGY3YWUyOTQ1OGNkYTI3MjY1MmQ5ZDdmM2U1ZjY5YTkzYmY3MA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 83e5452a14a22fc372b41c3594719280f766442c
|
4
|
+
data.tar.gz: 9fb64a9e8c4535d0054837b7989b00e41df3ef52
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
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
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.
|
4
|
-
s.date = '
|
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"]
|
data/lib/brocadesan/switch.rb
CHANGED
@@ -412,16 +412,18 @@ module SAN
|
|
412
412
|
|
413
413
|
|
414
414
|
# storing defined
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
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
|
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
|
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
|
|
data/test/outputs/agshow_1.txt
CHANGED
@@ -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
|
data/test/outputs/dlsshow_1.txt
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
> dlsshow
|
2
2
|
|
3
|
-
|
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
|
|
data/test/outputs/dlsshow_1.yml
CHANGED
data/test/outputs/dlsshow_2.txt
CHANGED
data/test/outputs/dlsshow_2.yml
CHANGED
@@ -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
|
data/test/outputs/iodshow_1.txt
CHANGED
data/test/outputs/islshow_1.txt
CHANGED
@@ -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
|
data/test/outputs/islshow_2.txt
CHANGED
data/test/outputs/ns_1.txt
CHANGED
data/test/outputs/ns_2.txt
CHANGED
data/test/outputs/switch_1.txt
CHANGED
data/test/outputs/switch_2.txt
CHANGED
data/test/outputs/switch_3.txt
CHANGED
data/test/outputs/version_1.txt
CHANGED
data/test/switch_test.rb
CHANGED
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.
|
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:
|
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.
|
170
|
+
rubygems_version: 2.4.5.2
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Brocade SAN library
|