brocadesan 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +113 -0
- data/Rakefile +46 -0
- data/brocadesan.gemspec +14 -0
- data/lib/brocadesan.rb +8 -0
- data/lib/brocadesan/alias.rb +64 -0
- data/lib/brocadesan/config/brocade/san/switch_cmd_mapping.yml +116 -0
- data/lib/brocadesan/config/parser_mapping.yml +21 -0
- data/lib/brocadesan/device.rb +296 -0
- data/lib/brocadesan/monkey/string.rb +11 -0
- data/lib/brocadesan/provisioning.rb +894 -0
- data/lib/brocadesan/switch.rb +882 -0
- data/lib/brocadesan/wwn.rb +63 -0
- data/lib/brocadesan/zone.rb +60 -0
- data/lib/brocadesan/zone_configuration.rb +38 -0
- data/lib/meta_methods.rb +263 -0
- data/test/alias_test.rb +68 -0
- data/test/device_test.rb +203 -0
- data/test/output_helpers.rb +308 -0
- data/test/outputs/agshow_1.txt +7 -0
- data/test/outputs/agshow_1.yml +31 -0
- data/test/outputs/agshow_2.txt +4 -0
- data/test/outputs/agshow_2.yml +3 -0
- data/test/outputs/apt_policy_1.txt +6 -0
- data/test/outputs/apt_policy_1.yml +3 -0
- data/test/outputs/cfgshow_1.txt +5 -0
- data/test/outputs/cfgshow_1.yml +7 -0
- data/test/outputs/cfgshow_2.txt +31 -0
- data/test/outputs/cfgshow_2.yml +32 -0
- data/test/outputs/cfgshow_3.txt +9 -0
- data/test/outputs/cfgshow_3.yml +12 -0
- data/test/outputs/cfgtransshow_1.txt +2 -0
- data/test/outputs/cfgtransshow_1.yml +5 -0
- data/test/outputs/cfgtransshow_2.txt +3 -0
- data/test/outputs/cfgtransshow_2.yml +4 -0
- data/test/outputs/cfgtransshow_3.txt +3 -0
- data/test/outputs/cfgtransshow_3.yml +4 -0
- data/test/outputs/chassisname_1.txt +2 -0
- data/test/outputs/chassisname_1.yml +3 -0
- data/test/outputs/dlsshow_1.txt +4 -0
- data/test/outputs/dlsshow_1.yml +4 -0
- data/test/outputs/dlsshow_2.txt +4 -0
- data/test/outputs/dlsshow_2.yml +4 -0
- data/test/outputs/fabricshow_1.txt +10 -0
- data/test/outputs/fabricshow_1.yml +34 -0
- data/test/outputs/iodshow_1.txt +4 -0
- data/test/outputs/iodshow_1.yml +4 -0
- data/test/outputs/islshow_1.txt +6 -0
- data/test/outputs/islshow_1.yml +62 -0
- data/test/outputs/islshow_2.txt +2 -0
- data/test/outputs/islshow_2.yml +2 -0
- data/test/outputs/lscfg_show_1.txt +71 -0
- data/test/outputs/lscfg_show_1.yml +5 -0
- data/test/outputs/ns_1.txt +80 -0
- data/test/outputs/ns_1.yml +39 -0
- data/test/outputs/ns_2.txt +37 -0
- data/test/outputs/ns_2.yml +21 -0
- data/test/outputs/putty.log +1867 -0
- data/test/outputs/switch_1.txt +25 -0
- data/test/outputs/switch_1.yml +73 -0
- data/test/outputs/switch_2.txt +18 -0
- data/test/outputs/switch_2.yml +42 -0
- data/test/outputs/switch_3.txt +14 -0
- data/test/outputs/switch_3.yml +46 -0
- data/test/outputs/switchstatusshow_1.txt +21 -0
- data/test/outputs/switchstatusshow_1.yml +19 -0
- data/test/outputs/trunkshow_1.txt +8 -0
- data/test/outputs/trunkshow_1.yml +44 -0
- data/test/outputs/trunkshow_2.txt +2 -0
- data/test/outputs/trunkshow_2.yml +2 -0
- data/test/outputs/version_1.txt +6 -0
- data/test/outputs/version_1.yml +8 -0
- data/test/outputs/vf_switch_1.txt +25 -0
- data/test/outputs/vf_switch_1.yml +73 -0
- data/test/provisioning_test.rb +1043 -0
- data/test/switch_test.rb +476 -0
- data/test/wwn_test.rb +41 -0
- data/test/zone_configuration_test.rb +65 -0
- data/test/zone_test.rb +73 -0
- metadata +170 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
> agshow
|
2
|
+
Worldwide Name Ports Enet IP Addr Firmware Local/Remote Name
|
3
|
+
------------------------------------------------------------------------------------------------------
|
4
|
+
10:00:00:11:0a:00:84:a2 24 15.84.68.94 v6.1.0_uth8 remote VCFC2CN8314D00X
|
5
|
+
10:00:00:11:0a:00:85:29 24 15.84.68.96 v6.1.0_uth8 remote VCFC2CN8311D0B3
|
6
|
+
10:00:50:eb:1a:25:fc:ae 24 10.200.16.161 v7.1.1c local H4C13R253-U12-ICB03
|
7
|
+
10:00:50:eb:1a:27:f6:02 24 10.200.16.111 v7.1.1c local H4C13R253-U02-ICB03
|
@@ -0,0 +1,31 @@
|
|
1
|
+
:parsing_position: end
|
2
|
+
:ag:
|
3
|
+
-
|
4
|
+
:ports: 24
|
5
|
+
:wwn: '10:00:00:11:0a:00:84:a2'
|
6
|
+
:eth_ip: 15.84.68.94
|
7
|
+
:version: v6.1.0_uth8
|
8
|
+
:name: VCFC2CN8314D00X
|
9
|
+
:local: false
|
10
|
+
-
|
11
|
+
:ports: 24
|
12
|
+
:wwn: '10:00:00:11:0a:00:85:29'
|
13
|
+
:eth_ip: 15.84.68.96
|
14
|
+
:version: v6.1.0_uth8
|
15
|
+
:name: VCFC2CN8311D0B3
|
16
|
+
:local: false
|
17
|
+
-
|
18
|
+
:ports: 24
|
19
|
+
:wwn: '10:00:50:eb:1a:25:fc:ae'
|
20
|
+
:eth_ip: 10.200.16.161
|
21
|
+
:version: v7.1.1c
|
22
|
+
:name: H4C13R253-U12-ICB03
|
23
|
+
:local: true
|
24
|
+
-
|
25
|
+
:ports: 24
|
26
|
+
:wwn: '10:00:50:eb:1a:27:f6:02'
|
27
|
+
:eth_ip: 10.200.16.111
|
28
|
+
:version: v7.1.1c
|
29
|
+
:name: H4C13R253-U02-ICB03
|
30
|
+
:local: true
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
> cfgshow
|
2
|
+
Defined configuration:
|
3
|
+
cfg: AIS_IDA_SANA zone1;
|
4
|
+
zone2;zone3
|
5
|
+
zone: zone1 alias1;
|
6
|
+
alias2
|
7
|
+
zone: zone2 alias1;
|
8
|
+
alias3
|
9
|
+
zone: zone3
|
10
|
+
alias3;alias4
|
11
|
+
zone: zone5 alias1;alias4
|
12
|
+
alias: alias1 50:01:43:80:03:BC:68:00
|
13
|
+
alias: alias2
|
14
|
+
50:01:43:80:12:0E:2B:60
|
15
|
+
alias: alias3
|
16
|
+
50:01:43:80:12:0E:25:18
|
17
|
+
alias: alias4
|
18
|
+
50:01:43:80:18:69:33:70
|
19
|
+
|
20
|
+
Effective configuration:
|
21
|
+
cfg: AIS_IDA_SANA
|
22
|
+
zone: zone1
|
23
|
+
50:01:43:80:03:BC:68:00
|
24
|
+
50:01:43:80:12:0E:2B:60
|
25
|
+
zone: zone2
|
26
|
+
50:01:43:80:03:BC:68:00
|
27
|
+
50:01:43:80:12:0E:25:18
|
28
|
+
zone: zone3
|
29
|
+
50:01:43:80:12:0E:25:18
|
30
|
+
50:01:43:80:18:69:33:70
|
31
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
:defined_configuration:
|
2
|
+
:cfg:
|
3
|
+
AIS_IDA_SANA:
|
4
|
+
- zone1
|
5
|
+
- zone2
|
6
|
+
- zone3
|
7
|
+
:zone:
|
8
|
+
zone1:
|
9
|
+
- alias1
|
10
|
+
- alias2
|
11
|
+
zone2:
|
12
|
+
- alias1
|
13
|
+
- alias3
|
14
|
+
zone3:
|
15
|
+
- alias3
|
16
|
+
- alias4
|
17
|
+
zone5:
|
18
|
+
- alias1
|
19
|
+
- alias4
|
20
|
+
:alias:
|
21
|
+
alias1:
|
22
|
+
- 50:01:43:80:03:BC:68:00
|
23
|
+
alias2:
|
24
|
+
- 50:01:43:80:12:0E:2B:60
|
25
|
+
alias3:
|
26
|
+
- 50:01:43:80:12:0E:25:18
|
27
|
+
alias4:
|
28
|
+
- 50:01:43:80:18:69:33:70
|
29
|
+
:effective_configuration:
|
30
|
+
:cfg:
|
31
|
+
AIS_IDA_SANA: []
|
32
|
+
:parsing_position: end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
> fabricshow
|
2
|
+
Switch ID Worldwide Name Enet IP Addr FC IP Addr Name
|
3
|
+
-------------------------------------------------------------------------
|
4
|
+
1: fffc01 10:00:00:05:1e:4c:24:00 15.187.118.17 0.0.0.0 >"IDAA1C01"
|
5
|
+
2: fffc02 10:00:00:05:33:25:16:00 15.187.118.52 0.0.0.0 "IDAA1C02"
|
6
|
+
129: fffc81 10:00:00:05:1e:50:ad:00 15.187.119.18 0.0.0.0 "GREA1C01"
|
7
|
+
132: fffc84 10:00:00:05:33:25:12:00 15.187.119.38 0.0.0.0 "GREA1C02"
|
8
|
+
|
9
|
+
The Fabric has 4 switches
|
10
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
:parsing_position: end
|
2
|
+
:fabric:
|
3
|
+
-
|
4
|
+
:domain_id: '1'
|
5
|
+
:sid: 'fffc01'
|
6
|
+
:wwn: '10:00:00:05:1e:4c:24:00'
|
7
|
+
:eth_ip: 15.187.118.17
|
8
|
+
:fc_ip: 0.0.0.0
|
9
|
+
:name: IDAA1C01
|
10
|
+
:local: true
|
11
|
+
-
|
12
|
+
:domain_id: '2'
|
13
|
+
:sid: 'fffc02'
|
14
|
+
:wwn: '10:00:00:05:33:25:16:00'
|
15
|
+
:eth_ip: 15.187.118.52
|
16
|
+
:fc_ip: 0.0.0.0
|
17
|
+
:name: IDAA1C02
|
18
|
+
:local: false
|
19
|
+
-
|
20
|
+
:domain_id: '129'
|
21
|
+
:sid: 'fffc81'
|
22
|
+
:wwn: '10:00:00:05:1e:50:ad:00'
|
23
|
+
:eth_ip: 15.187.119.18
|
24
|
+
:fc_ip: 0.0.0.0
|
25
|
+
:name: GREA1C01
|
26
|
+
:local: false
|
27
|
+
-
|
28
|
+
:domain_id: '132'
|
29
|
+
:sid: 'fffc84'
|
30
|
+
:wwn: '10:00:00:05:33:25:12:00'
|
31
|
+
:eth_ip: 15.187.119.38
|
32
|
+
:fc_ip: 0.0.0.0
|
33
|
+
:name: GREA1C02
|
34
|
+
:local: false
|
@@ -0,0 +1,6 @@
|
|
1
|
+
> islshow
|
2
|
+
1: 0-> 0 10:00:00:05:33:23:86:00 1 H2C04R065-U03-A sp: 8.000G bw: 64.000G TRUNK QOS
|
3
|
+
2: 8-> 17 10:00:00:05:33:c6:f7:23 29 H4C11R218-U02-I sp: 8.000G bw: 8.000G
|
4
|
+
17: 32-> 64 10:00:00:27:f8:34:f7:00 41 DXS-898-U03-A01 sp: 4.000G bw: 4.000G CR_RECOV
|
5
|
+
18: 18->176 10:00:00:05:33:9b:d2:00 2 H4C11R215-U03-A sp: 8.000G bw: 8.000G
|
6
|
+
38:217-> 18 10:00:00:05:33:bd:13:a7 24 H2C04R085-U25-I sp: 8.000G bw: 8.000G
|
@@ -0,0 +1,62 @@
|
|
1
|
+
:parsing_position: end
|
2
|
+
:isl_links:
|
3
|
+
-
|
4
|
+
:id: 1
|
5
|
+
:source_port_index: 0
|
6
|
+
:destination_port_index: 0
|
7
|
+
:destination_switch_wwn: 10:00:00:05:33:23:86:00
|
8
|
+
:destination_switch_domain: 1
|
9
|
+
:destination_switch_name: H2C04R065-U03-A
|
10
|
+
:speed: 8
|
11
|
+
:bandwidth: 64
|
12
|
+
:trunk: true
|
13
|
+
:qos: true
|
14
|
+
:cr_recov: false
|
15
|
+
-
|
16
|
+
:id: 2
|
17
|
+
:source_port_index: 8
|
18
|
+
:destination_port_index: 17
|
19
|
+
:destination_switch_wwn: 10:00:00:05:33:c6:f7:23
|
20
|
+
:destination_switch_domain: 29
|
21
|
+
:destination_switch_name: H4C11R218-U02-I
|
22
|
+
:speed: 8
|
23
|
+
:bandwidth: 8
|
24
|
+
:trunk: false
|
25
|
+
:qos: false
|
26
|
+
:cr_recov: false
|
27
|
+
-
|
28
|
+
:id: 17
|
29
|
+
:source_port_index: 32
|
30
|
+
:destination_port_index: 64
|
31
|
+
:destination_switch_wwn: 10:00:00:27:f8:34:f7:00
|
32
|
+
:destination_switch_domain: 41
|
33
|
+
:destination_switch_name: DXS-898-U03-A01
|
34
|
+
:speed: 4
|
35
|
+
:bandwidth: 4
|
36
|
+
:trunk: false
|
37
|
+
:qos: false
|
38
|
+
:cr_recov: true
|
39
|
+
-
|
40
|
+
:id: 18
|
41
|
+
:source_port_index: 18
|
42
|
+
:destination_port_index: 176
|
43
|
+
:destination_switch_wwn: 10:00:00:05:33:9b:d2:00
|
44
|
+
:destination_switch_domain: 2
|
45
|
+
:destination_switch_name: H4C11R215-U03-A
|
46
|
+
:speed: 8
|
47
|
+
:bandwidth: 8
|
48
|
+
:trunk: false
|
49
|
+
:qos: false
|
50
|
+
:cr_recov: false
|
51
|
+
-
|
52
|
+
:id: 38
|
53
|
+
:source_port_index: 217
|
54
|
+
:destination_port_index: 18
|
55
|
+
:destination_switch_wwn: 10:00:00:05:33:bd:13:a7
|
56
|
+
:destination_switch_domain: 24
|
57
|
+
:destination_switch_name: H2C04R085-U25-I
|
58
|
+
:speed: 8
|
59
|
+
:bandwidth: 8
|
60
|
+
:trunk: false
|
61
|
+
:qos: false
|
62
|
+
:cr_recov: false
|
@@ -0,0 +1,71 @@
|
|
1
|
+
> lscfg --show
|
2
|
+
|
3
|
+
Created switches: 128(ds) 99
|
4
|
+
Slot 1 2 3 4 5 6 7 8 9 10 11 12
|
5
|
+
-------------------------------------------------------------------------------
|
6
|
+
Port
|
7
|
+
0 | 128 | 128 | 128 | 99 | 128 | | | 128 | 99 | 128 | 128 | 128 |
|
8
|
+
1 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
9
|
+
2 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
10
|
+
3 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
11
|
+
4 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
12
|
+
5 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
13
|
+
6 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
14
|
+
7 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
15
|
+
8 | 99 | 99 | 99 | 128 | 128 | | | 128 | 128 | 128 | 99 | 99 |
|
16
|
+
9 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
17
|
+
10 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
18
|
+
11 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
19
|
+
12 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
20
|
+
13 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
21
|
+
14 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
22
|
+
15 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
23
|
+
16 | 128 | 128 | 128 | 128 | 128 | | | 128 | 99 | 99 | 128 | 99 |
|
24
|
+
17 | 128 | 128 | 128 | 99 | 128 | | | 128 | 99 | 99 | 128 | 128 |
|
25
|
+
18 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
26
|
+
19 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
27
|
+
20 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
28
|
+
21 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
29
|
+
22 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
30
|
+
23 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
31
|
+
24 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 99 | 128 |
|
32
|
+
25 | 99 | 99 | 99 | 128 | 128 | | | 128 | 99 | 99 | 128 | 128 |
|
33
|
+
26 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
34
|
+
27 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
35
|
+
28 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
36
|
+
29 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
37
|
+
30 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
38
|
+
31 | 128 | 128 | 128 | 128 | 128 | | | 128 | 128 | 128 | 128 | 128 |
|
39
|
+
32 | | | | | | | | | | | | |
|
40
|
+
33 | | | | | | | | | | | | |
|
41
|
+
34 | | | | | | | | | | | | |
|
42
|
+
35 | | | | | | | | | | | | |
|
43
|
+
36 | | | | | | | | | | | | |
|
44
|
+
37 | | | | | | | | | | | | |
|
45
|
+
38 | | | | | | | | | | | | |
|
46
|
+
39 | | | | | | | | | | | | |
|
47
|
+
40 | | | | | | | | | | | | |
|
48
|
+
41 | | | | | | | | | | | | |
|
49
|
+
42 | | | | | | | | | | | | |
|
50
|
+
43 | | | | | | | | | | | | |
|
51
|
+
44 | | | | | | | | | | | | |
|
52
|
+
45 | | | | | | | | | | | | |
|
53
|
+
46 | | | | | | | | | | | | |
|
54
|
+
47 | | | | | | | | | | | | |
|
55
|
+
48 | | | | | | | | | | | | |
|
56
|
+
49 | | | | | | | | | | | | |
|
57
|
+
50 | | | | | | | | | | | | |
|
58
|
+
51 | | | | | | | | | | | | |
|
59
|
+
52 | | | | | | | | | | | | |
|
60
|
+
53 | | | | | | | | | | | | |
|
61
|
+
54 | | | | | | | | | | | | |
|
62
|
+
55 | | | | | | | | | | | | |
|
63
|
+
56 | | | | | | | | | | | | |
|
64
|
+
57 | | | | | | | | | | | | |
|
65
|
+
58 | | | | | | | | | | | | |
|
66
|
+
59 | | | | | | | | | | | | |
|
67
|
+
60 | | | | | | | | | | | | |
|
68
|
+
61 | | | | | | | | | | | | |
|
69
|
+
62 | | | | | | | | | | | | |
|
70
|
+
63 | | | | | | | | | | | | |
|
71
|
+
|