forked from extremenetworks/ExtremeScripting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnabledFeatures.xsf
More file actions
484 lines (465 loc) · 13.8 KB
/
Copy pathEnabledFeatures.xsf
File metadata and controls
484 lines (465 loc) · 13.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
enable cli scripting
# @MetaDataStart
#@DetailDescriptionStart
###############################################################################
# Extreme Networks(R) CLI Profile Library
#
# Script : EnabledFeatures
# Revision : 1.0
# Last Updated : May 27, 2008
#
# Purpose: This script identifies the features enabled on a switch. The list
# of features is discovered by a series of if/then else statements and includes
# most of the common features that may be enabled by a swtich. This list does
# not include all possible features of a switch and may be modified to
# include the unique features running on your network.
# Note: This widget requires ExtremeXOS 12.1. The commands within the
# script body can be issued manually to accomplish the same result
# on earlier versions of ExtremeXOS prior to 12.1.
#
###############################################################################
#@DetailDescriptionEnd
###########"aaa"
set var CLI.OUT " "
show configuration aaa detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable radius} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "RADIUS is enabled"
show var x1
else
set var x1 "RADIUS is disabled"
show var x1
endif
set var x4 $TCL(regexp -nocase {enable tacacs} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "TACACS is enabled"
show var x1
else
set var x1 "TACACS is disabled"
show var x1
endif
#########"acl"
set var CLI.OUT " "
show access-list
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {No entry found} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "No Access List configured"
show var x1
else
set var x1 "Access List(s) configured"
show var x1
endif
############"bgp"
set var CLI.OUT " "
show configuration bgp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable bgp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "BGP is enabled"
show var x1
else
set var x1 "BGP is disabled"
show var x1
endif
########"cfgmgr"
set var CLI.OUT " "
show configuration cfgmgr detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable cli-config-logging} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Configuration logging is enabled"
show var x1
else
set var x1 "Configuration logging is disabled"
show var x1
endif
set var x4 $TCL(regexp -nocase {enable cli scripting} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "CLI scripting is enabled"
show var x1
else
set var x1 "CLI scripting is disabled"
show var x1
endif
#########"eaps"
set var CLI.OUT " "
show configuration eaps detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable eaps} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "EAPS is enabled"
show var x1
else
set var x1 "EAPS is disabled"
show var x1
endif
#########"edp"
set var CLI.OUT " "
show configuration edp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable edp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "EDP is enabled on port(s)"
show var x1
else
set var x1 "EDP is disabled"
show var x1
endif
#########"elrp" -
set var CLI.OUT " "
show configuration elrp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable elrp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "ELRP is enabled"
show var x1
else
set var x1 "ELRP is disabled"
show var x1
endif
#########"elsm"
set var CLI.OUT " "
show configuration elsm detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable elsm} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "ELSM is enabled"
show var x1
else
set var x1 "ELSM is disabled"
show var x1
endif
##########"ems"
set var CLI.OUT " "
show configuration ems detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable log debug-mode} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Debug Mode is enabled"
show var x1
else
set var x1 "Debug Mode is disabled"
show var x1
endif
###########"esrp"
set var CLI.OUT " "
show configuration esrp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable esrp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "ESRP is enabled"
show var x1
else
set var x1 "ESRP is disabled"
show var x1
endif
###### "fdb" ######
set var CLI.OUT " "
show configuration fdb detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable iparp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "IPARP is enabled"
show var x1
else
set var x1 "IPARP is disabled"
show var x1
endif
########"lldp" - search enable statement and output sh lldp
set var CLI.OUT " "
show configuration lldp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable lldp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "LLDP is enabled"
show var x1
else
set var x1 "LLDP is disabled"
show var x1
endif
##########"mcmgr" - search for enable statement and output sh igmp and sh mld
set var CLI.OUT " "
show configuration mcmgr detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable igmp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "IGMP Snooping is enabled"
show var x1
else
set var x1 "IGMP Snooping is disabled"
show var x1
endif
set var x4 $TCL(regexp -nocase {enable mld} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "MLD is enabled"
show var x1
else
set var x1 "MLD is disabled"
show var x1
endif
set var x4 $TCL(regexp -nocase {enable MVR} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "MVR is enabled"
show var x1
else
set var x1 "MVR is disabled"
show var x1
endif
#########"msdp" - search for enable statement with vr and output the sh msdp command.
set var CLI.OUT " "
show configuration msdp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable msdp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "MSDP is enabled"
show var x1
else
set var x1 "MSDP is disabled"
show var x1
endif
#######"netlogin" - search for enable statement with dot1x,mac,ports, or web based
set var CLI.OUT " "
show configuration netlogin detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable netlogin port} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "NetLogin is enabled on port(s)"
show var x1
else
set var x1 "NetLogin is disabled"
show var x1
endif
###########"nettools" - search for enable statement and output sh sntp command
set var CLI.OUT " "
show configuration nettools detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable sntp-client} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "SNTP is enabled"
show var x1
else
set var x1 "SNTP is disabled"
show var x1
endif
#########"ospf" - search for enable statement and output sh ospf command
set var CLI.OUT " "
show configuration ospf detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable iparp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "OSPF is enabled"
show var x1
else
set var x1 "OSPF is disabled"
show var x1
endif
#########"ospfv3" - search for enable statement and output sh ospfv3 command
set var CLI.OUT " "
show configuration ospfv3 detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable ospfv3} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "OSPFv3 is enabled"
show var x1
else
set var x1 "OSPFv3 is disabled"
show var x1
endif
#########"pim" - search for enable statement and output sh pim command
set var CLI.OUT " "
show configuration pim detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable pim} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "PIM is enabled"
show var x1
else
set var x1 "PIM is disabled"
show var x1
endif
########"rip" - search for enable statement and output sh rip command
set var CLI.OUT " "
show configuration rip detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable rip\n} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "RIP is enabled"
show var x1
else
set var x1 "RIP is disabled"
show var x1
endif
#########"ripng" - search for enable statement and output sh ripng command
set var CLI.OUT " "
show configuration ripng detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable ripng} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "RIPNG is enabled"
show var x1
else
set var x1 "RIPMG is disabled"
show var x1
endif
########"rtmgr" - search for enable statement and output sh
set var CLI.OUT " "
show configuration rtmgr detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable iproute} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "IP route sharing is enabled"
show var x1
else
set var x1 "IP route sharing is disabled"
show var x1
endif
#######"snmp" - search for enable statement and output sh snmp command
set var CLI.OUT " "
show configuration snmp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable snmp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "SNMP is enabled"
show var x1
else
set var x1 "SNMP is disabled"
show var x1
endif
#######"stp" - search for enable statement and output sh stpd command
set var CLI.OUT " "
show configuration stp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable stp\n} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Spanning Tree is enabled"
show var x1
else
set var x1 "Spanning Tree is disabled"
show var x1
endif
#########"telnetd"
set var CLI.OUT " "
show configuration telnetd detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable telnet} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Telnet is enabled"
show var x1
else
set var x1 "Telnet is disabled"
show var x1
endif
#######"thttpd" - search for enable statement
set var CLI.OUT " "
show configuration thttpd detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable web http} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Web mode HTTP is enabled"
show var x1
else
set var x1 "Web mode HTTP is disabled"
show var x1
endif
set var x4 $TCL(regexp -nocase {enable web https} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Web mode HTTPS is enabled"
show var x1
else
set var x1 "Web mode HTTPS is disabled"
show var x1
endif
#######"vlan" - search for create statement and output sh vlan command
set var CLI.OUT " "
show configuration vlan detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {create vlan} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "VLAN(s) created"
show var x1
else
set var x1 "VLAN(s) not created other than default and mgmt"
show var x1
endif
set var x4 $TCL(regexp -nocase {create vman} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "VMAN(s) created"
show var x1
else
set var x1 "VMAN(s) not created"
show var x1
endif
######## vrrp" - search for enable statement
set var CLI.OUT " "
show configuration vrrp detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable vrrp} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "VRRP is enabled"
show var x1
else
set var x1 "VRRP is disabled"
show var x1
endif
######## vmt" - search for enable statement
set var CLI.OUT " "
show configuration vmt detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable vm-tracking} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Virtual Machine Tracking is enabled"
show var x1
else
set var x1 "Virtual Machine Tracking is disabled"
show var x1
endif
######## clear-flow" - search for enable statement
set var CLI.OUT " "
show configuration acl detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable clear-flow} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "CLEAR-Flow is enabled"
show var x1
else
set var x1 "CLEAR-Flow is disabled"
show var x1
endif
######## IDM" - search for enable statement
set var CLI.OUT " "
show configuration idmgr detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable identity-management} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "Identity-Management is enabled"
show var x1
else
set var x1 "Identity-Management is disabled"
show var x1
endif
######## EMS UPM LOG targets" - search for enable statement
set var CLI.OUT " "
show configuration ems detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable log target upm} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "UPM has Log Targets enabled in EMS"
show var x1
else
set var x1 "There are no log targets present in EMS"
show var x1
endif
######## EMS UPM LOG targets" - search for enable statement
set var CLI.OUT " "
show configuration vsm detail
set var y1 $TCL(split ${CLI.OUT} "\n")
set var x4 $TCL(regexp -nocase {enable mlag} ${CLI.OUT})
if ($x4 == 1) then
set var x1 "There are MLAGs Present"
show var x1
else
set var x1 "There are no MLAGs Present"
show var x1
endif