blob: 07fb66877e7d56c6603f0827fd5597f210ff0993 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001class NEC:
kelvin-onlab898a6c62015-01-16 14:13:53 -08002
adminbae64d82013-08-01 10:50:15 -07003 def __init__( self ):
4 self.prompt = '(.*)'
kelvin-onlab898a6c62015-01-16 14:13:53 -08005 self.timeout = 60
adminbae64d82013-08-01 10:50:15 -07006
kelvin-onlab898a6c62015-01-16 14:13:53 -08007 def show( self, *options, **def_args ):
8 "Possible Options :[' access-filter ', ' accounting ', ' acknowledgments ', ' auto-config ', ' axrp ', ' cfm ', ' channel-group ', ' clock ', ' config-lock-status ', ' cpu ', ' dhcp ', ' dot1x ', ' dumpfile ', ' efmoam ', ' environment ', ' file ', ' flash ', ' gsrp ', ' history ', ' igmp-snooping ', ' interfaces ', ' ip ', ' ip-dual ', ' ipv6-dhcp ', ' license ', ' lldp ', ' logging ', ' loop-detection ', ' mac-address-table ', ' mc ', ' memory ', ' mld-snooping ', ' netconf ', ' netstat ', ' ntp ', ' oadp ', ' openflow ', ' port ', ' power ', ' processes ', ' qos ', ' qos-flow ', ' sessions ', ' sflow ', ' spanning-tree ', ' ssh ', ' system ', ' tcpdump ', ' tech-support ', ' track ', ' version ', ' vlan ', ' vrrpstatus ', ' whoami ']"
9 arguments = ''
adminbae64d82013-08-01 10:50:15 -070010 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080011 arguments = arguments + option + ' '
12 prompt = def_args.setdefault( 'prompt', self.prompt )
13 timeout = def_args.setdefault( 'timeout', self.timeout )
14 self.execute( cmd="show " + arguments, prompt=prompt, timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070015 return main.TRUE
16
kelvin-onlab898a6c62015-01-16 14:13:53 -080017 def show_ip( self, *options, **def_args ):
18 "Possible Options :[]"
19 arguments = ''
adminbae64d82013-08-01 10:50:15 -070020 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080021 arguments = arguments + option + ' '
22 prompt = def_args.setdefault( 'prompt', self.prompt )
23 timeout = def_args.setdefault( 'timeout', self.timeout )
24 self.execute(
25 cmd="show ip " +
26 arguments,
27 prompt=prompt,
28 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070029 return main.TRUE
30
kelvin-onlab898a6c62015-01-16 14:13:53 -080031 def show_mc( self, *options, **def_args ):
32 "Possible Options :[]"
33 arguments = ''
adminbae64d82013-08-01 10:50:15 -070034 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080035 arguments = arguments + option + ' '
36 prompt = def_args.setdefault( 'prompt', self.prompt )
37 timeout = def_args.setdefault( 'timeout', self.timeout )
38 self.execute(
39 cmd="show mc " +
40 arguments,
41 prompt=prompt,
42 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070043 return main.TRUE
44
kelvin-onlab898a6c62015-01-16 14:13:53 -080045 def show_cfm( self, *options, **def_args ):
46 "Possible Options :[]"
47 arguments = ''
adminbae64d82013-08-01 10:50:15 -070048 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080049 arguments = arguments + option + ' '
50 prompt = def_args.setdefault( 'prompt', self.prompt )
51 timeout = def_args.setdefault( 'timeout', self.timeout )
52 self.execute(
53 cmd="show cfm " +
54 arguments,
55 prompt=prompt,
56 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070057 return main.TRUE
58
kelvin-onlab898a6c62015-01-16 14:13:53 -080059 def show_ntp( self, *options, **def_args ):
60 "Possible Options :[]"
61 arguments = ''
adminbae64d82013-08-01 10:50:15 -070062 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080063 arguments = arguments + option + ' '
64 prompt = def_args.setdefault( 'prompt', self.prompt )
65 timeout = def_args.setdefault( 'timeout', self.timeout )
66 self.execute(
67 cmd="show ntp " +
68 arguments,
69 prompt=prompt,
70 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070071 return main.TRUE
72
kelvin-onlab898a6c62015-01-16 14:13:53 -080073 def show_ssh( self, *options, **def_args ):
74 "Possible Options :[]"
75 arguments = ''
adminbae64d82013-08-01 10:50:15 -070076 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080077 arguments = arguments + option + ' '
78 prompt = def_args.setdefault( 'prompt', self.prompt )
79 timeout = def_args.setdefault( 'timeout', self.timeout )
80 self.execute(
81 cmd="show ssh " +
82 arguments,
83 prompt=prompt,
84 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070085 return main.TRUE
86
kelvin-onlab898a6c62015-01-16 14:13:53 -080087 def show_qos( self, *options, **def_args ):
88 "Possible Options :[]"
89 arguments = ''
adminbae64d82013-08-01 10:50:15 -070090 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080091 arguments = arguments + option + ' '
92 prompt = def_args.setdefault( 'prompt', self.prompt )
93 timeout = def_args.setdefault( 'timeout', self.timeout )
94 self.execute(
95 cmd="show qos " +
96 arguments,
97 prompt=prompt,
98 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070099 return main.TRUE
100
kelvin-onlab898a6c62015-01-16 14:13:53 -0800101 def show_cpu( self, *options, **def_args ):
102 "Possible Options :[]"
103 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700104 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800105 arguments = arguments + option + ' '
106 prompt = def_args.setdefault( 'prompt', self.prompt )
107 timeout = def_args.setdefault( 'timeout', self.timeout )
108 self.execute(
109 cmd="show cpu " +
110 arguments,
111 prompt=prompt,
112 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700113 return main.TRUE
114
kelvin-onlab898a6c62015-01-16 14:13:53 -0800115 def show_vlan( self, *options, **def_args ):
116 "Possible Options :[]"
117 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700118 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800119 arguments = arguments + option + ' '
120 prompt = def_args.setdefault( 'prompt', self.prompt )
121 timeout = def_args.setdefault( 'timeout', self.timeout )
122 self.execute(
123 cmd="show vlan " +
124 arguments,
125 prompt=prompt,
126 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700127 return main.TRUE
128
kelvin-onlab898a6c62015-01-16 14:13:53 -0800129 def show_lldp( self, *options, **def_args ):
130 "Possible Options :[]"
131 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700132 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800133 arguments = arguments + option + ' '
134 prompt = def_args.setdefault( 'prompt', self.prompt )
135 timeout = def_args.setdefault( 'timeout', self.timeout )
136 self.execute(
137 cmd="show lldp " +
138 arguments,
139 prompt=prompt,
140 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700141 return main.TRUE
142
kelvin-onlab898a6c62015-01-16 14:13:53 -0800143 def show_dhcp( self, *options, **def_args ):
144 "Possible Options :[]"
145 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700146 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800147 arguments = arguments + option + ' '
148 prompt = def_args.setdefault( 'prompt', self.prompt )
149 timeout = def_args.setdefault( 'timeout', self.timeout )
150 self.execute(
151 cmd="show dhcp " +
152 arguments,
153 prompt=prompt,
154 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700155 return main.TRUE
156
kelvin-onlab898a6c62015-01-16 14:13:53 -0800157 def show_axrp( self, *options, **def_args ):
158 "Possible Options :[]"
159 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700160 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800161 arguments = arguments + option + ' '
162 prompt = def_args.setdefault( 'prompt', self.prompt )
163 timeout = def_args.setdefault( 'timeout', self.timeout )
164 self.execute(
165 cmd="show axrp " +
166 arguments,
167 prompt=prompt,
168 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700169 return main.TRUE
170
kelvin-onlab898a6c62015-01-16 14:13:53 -0800171 def show_oadp( self, *options, **def_args ):
172 "Possible Options :[]"
173 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700174 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800175 arguments = arguments + option + ' '
176 prompt = def_args.setdefault( 'prompt', self.prompt )
177 timeout = def_args.setdefault( 'timeout', self.timeout )
178 self.execute(
179 cmd="show oadp " +
180 arguments,
181 prompt=prompt,
182 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700183 return main.TRUE
184
kelvin-onlab898a6c62015-01-16 14:13:53 -0800185 def show_gsrp( self, *options, **def_args ):
186 "Possible Options :[]"
187 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700188 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800189 arguments = arguments + option + ' '
190 prompt = def_args.setdefault( 'prompt', self.prompt )
191 timeout = def_args.setdefault( 'timeout', self.timeout )
192 self.execute(
193 cmd="show gsrp " +
194 arguments,
195 prompt=prompt,
196 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700197 return main.TRUE
198
kelvin-onlab898a6c62015-01-16 14:13:53 -0800199 def show_port( self, *options, **def_args ):
200 "Possible Options :[]"
201 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700202 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800203 arguments = arguments + option + ' '
204 prompt = def_args.setdefault( 'prompt', self.prompt )
205 timeout = def_args.setdefault( 'timeout', self.timeout )
206 self.execute(
207 cmd="show port " +
208 arguments,
209 prompt=prompt,
210 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700211 return main.TRUE
212
kelvin-onlab898a6c62015-01-16 14:13:53 -0800213 def show_file( self, *options, **def_args ):
214 "Possible Options :[]"
215 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700216 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800217 arguments = arguments + option + ' '
218 prompt = def_args.setdefault( 'prompt', self.prompt )
219 timeout = def_args.setdefault( 'timeout', self.timeout )
220 self.execute(
221 cmd="show file " +
222 arguments,
223 prompt=prompt,
224 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700225 return main.TRUE
226
kelvin-onlab898a6c62015-01-16 14:13:53 -0800227 def show_power( self, *options, **def_args ):
228 "Possible Options :[]"
229 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700230 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800231 arguments = arguments + option + ' '
232 prompt = def_args.setdefault( 'prompt', self.prompt )
233 timeout = def_args.setdefault( 'timeout', self.timeout )
234 self.execute(
235 cmd="show power " +
236 arguments,
237 prompt=prompt,
238 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700239 return main.TRUE
240
kelvin-onlab898a6c62015-01-16 14:13:53 -0800241 def show_clock( self, *options, **def_args ):
242 "Possible Options :[]"
243 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700244 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800245 arguments = arguments + option + ' '
246 prompt = def_args.setdefault( 'prompt', self.prompt )
247 timeout = def_args.setdefault( 'timeout', self.timeout )
248 self.execute(
249 cmd="show clock " +
250 arguments,
251 prompt=prompt,
252 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700253 return main.TRUE
254
kelvin-onlab898a6c62015-01-16 14:13:53 -0800255 def show_dot1x( self, *options, **def_args ):
256 "Possible Options :[]"
257 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700258 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800259 arguments = arguments + option + ' '
260 prompt = def_args.setdefault( 'prompt', self.prompt )
261 timeout = def_args.setdefault( 'timeout', self.timeout )
262 self.execute(
263 cmd="show dot1x " +
264 arguments,
265 prompt=prompt,
266 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700267 return main.TRUE
268
kelvin-onlab898a6c62015-01-16 14:13:53 -0800269 def show_sflow( self, *options, **def_args ):
270 "Possible Options :[]"
271 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700272 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800273 arguments = arguments + option + ' '
274 prompt = def_args.setdefault( 'prompt', self.prompt )
275 timeout = def_args.setdefault( 'timeout', self.timeout )
276 self.execute(
277 cmd="show sflow " +
278 arguments,
279 prompt=prompt,
280 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700281 return main.TRUE
282
kelvin-onlab898a6c62015-01-16 14:13:53 -0800283 def show_track( self, *options, **def_args ):
284 "Possible Options :[]"
285 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700286 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800287 arguments = arguments + option + ' '
288 prompt = def_args.setdefault( 'prompt', self.prompt )
289 timeout = def_args.setdefault( 'timeout', self.timeout )
290 self.execute(
291 cmd="show track " +
292 arguments,
293 prompt=prompt,
294 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700295 return main.TRUE
296
kelvin-onlab898a6c62015-01-16 14:13:53 -0800297 def show_flash( self, *options, **def_args ):
298 "Possible Options :[]"
299 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700300 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800301 arguments = arguments + option + ' '
302 prompt = def_args.setdefault( 'prompt', self.prompt )
303 timeout = def_args.setdefault( 'timeout', self.timeout )
304 self.execute(
305 cmd="show flash " +
306 arguments,
307 prompt=prompt,
308 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700309 return main.TRUE
310
kelvin-onlab898a6c62015-01-16 14:13:53 -0800311 def show_system( self, *options, **def_args ):
312 "Possible Options :[]"
313 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700314 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800315 arguments = arguments + option + ' '
316 prompt = def_args.setdefault( 'prompt', self.prompt )
317 timeout = def_args.setdefault( 'timeout', self.timeout )
318 self.execute(
319 cmd="show system " +
320 arguments,
321 prompt=prompt,
322 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700323 return main.TRUE
324
kelvin-onlab898a6c62015-01-16 14:13:53 -0800325 def show_whoami( self, *options, **def_args ):
326 "Possible Options :[]"
327 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700328 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800329 arguments = arguments + option + ' '
330 prompt = def_args.setdefault( 'prompt', self.prompt )
331 timeout = def_args.setdefault( 'timeout', self.timeout )
332 self.execute(
333 cmd="show whoami " +
334 arguments,
335 prompt=prompt,
336 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700337 return main.TRUE
338
kelvin-onlab898a6c62015-01-16 14:13:53 -0800339 def show_efmoam( self, *options, **def_args ):
340 "Possible Options :[]"
341 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700342 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800343 arguments = arguments + option + ' '
344 prompt = def_args.setdefault( 'prompt', self.prompt )
345 timeout = def_args.setdefault( 'timeout', self.timeout )
346 self.execute(
347 cmd="show efmoam " +
348 arguments,
349 prompt=prompt,
350 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700351 return main.TRUE
352
kelvin-onlab898a6c62015-01-16 14:13:53 -0800353 def show_memory( self, *options, **def_args ):
354 "Possible Options :[]"
355 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700356 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800357 arguments = arguments + option + ' '
358 prompt = def_args.setdefault( 'prompt', self.prompt )
359 timeout = def_args.setdefault( 'timeout', self.timeout )
360 self.execute(
361 cmd="show memory " +
362 arguments,
363 prompt=prompt,
364 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700365 return main.TRUE
366
kelvin-onlab898a6c62015-01-16 14:13:53 -0800367 def show_tcpdump( self, *options, **def_args ):
368 "Possible Options :[]"
369 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700370 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800371 arguments = arguments + option + ' '
372 prompt = def_args.setdefault( 'prompt', self.prompt )
373 timeout = def_args.setdefault( 'timeout', self.timeout )
374 self.execute(
375 cmd="show tcpdump " +
376 arguments,
377 prompt=prompt,
378 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700379 return main.TRUE
380
kelvin-onlab898a6c62015-01-16 14:13:53 -0800381 def show_history( self, *options, **def_args ):
382 "Possible Options :[]"
383 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700384 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800385 arguments = arguments + option + ' '
386 prompt = def_args.setdefault( 'prompt', self.prompt )
387 timeout = def_args.setdefault( 'timeout', self.timeout )
388 self.execute(
389 cmd="show history " +
390 arguments,
391 prompt=prompt,
392 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700393 return main.TRUE
394
kelvin-onlab898a6c62015-01-16 14:13:53 -0800395 def show_logging( self, *options, **def_args ):
396 "Possible Options :[]"
397 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700398 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800399 arguments = arguments + option + ' '
400 prompt = def_args.setdefault( 'prompt', self.prompt )
401 timeout = def_args.setdefault( 'timeout', self.timeout )
402 self.execute(
403 cmd="show logging " +
404 arguments,
405 prompt=prompt,
406 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700407 return main.TRUE
408
kelvin-onlab898a6c62015-01-16 14:13:53 -0800409 def show_license( self, *options, **def_args ):
410 "Possible Options :[]"
411 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700412 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800413 arguments = arguments + option + ' '
414 prompt = def_args.setdefault( 'prompt', self.prompt )
415 timeout = def_args.setdefault( 'timeout', self.timeout )
416 self.execute(
417 cmd="show license " +
418 arguments,
419 prompt=prompt,
420 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700421 return main.TRUE
422
kelvin-onlab898a6c62015-01-16 14:13:53 -0800423 def show_netstat( self, *options, **def_args ):
424 "Possible Options :[]"
425 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700426 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800427 arguments = arguments + option + ' '
428 prompt = def_args.setdefault( 'prompt', self.prompt )
429 timeout = def_args.setdefault( 'timeout', self.timeout )
430 self.execute(
431 cmd="show netstat " +
432 arguments,
433 prompt=prompt,
434 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700435 return main.TRUE
436
kelvin-onlab898a6c62015-01-16 14:13:53 -0800437 def show_version( self, *options, **def_args ):
438 "Possible Options :[]"
439 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700440 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800441 arguments = arguments + option + ' '
442 prompt = def_args.setdefault( 'prompt', self.prompt )
443 timeout = def_args.setdefault( 'timeout', self.timeout )
444 self.execute(
445 cmd="show version " +
446 arguments,
447 prompt=prompt,
448 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700449 return main.TRUE
450
kelvin-onlab898a6c62015-01-16 14:13:53 -0800451 def show_netconf( self, *options, **def_args ):
452 "Possible Options :[]"
453 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700454 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800455 arguments = arguments + option + ' '
456 prompt = def_args.setdefault( 'prompt', self.prompt )
457 timeout = def_args.setdefault( 'timeout', self.timeout )
458 self.execute(
459 cmd="show netconf " +
460 arguments,
461 prompt=prompt,
462 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700463 return main.TRUE
464
kelvin-onlab898a6c62015-01-16 14:13:53 -0800465 def show_ipdual( self, *options, **def_args ):
466 "Possible Options :[]"
467 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700468 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800469 arguments = arguments + option + ' '
470 prompt = def_args.setdefault( 'prompt', self.prompt )
471 timeout = def_args.setdefault( 'timeout', self.timeout )
472 self.execute(
473 cmd="show ip-dual " +
474 arguments,
475 prompt=prompt,
476 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700477 return main.TRUE
478
kelvin-onlab898a6c62015-01-16 14:13:53 -0800479 def show_sessions( self, *options, **def_args ):
480 "Possible Options :[]"
481 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700482 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800483 arguments = arguments + option + ' '
484 prompt = def_args.setdefault( 'prompt', self.prompt )
485 timeout = def_args.setdefault( 'timeout', self.timeout )
486 self.execute(
487 cmd="show sessions " +
488 arguments,
489 prompt=prompt,
490 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700491 return main.TRUE
492
kelvin-onlab898a6c62015-01-16 14:13:53 -0800493 def show_qosflow( self, *options, **def_args ):
494 "Possible Options :[]"
495 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700496 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800497 arguments = arguments + option + ' '
498 prompt = def_args.setdefault( 'prompt', self.prompt )
499 timeout = def_args.setdefault( 'timeout', self.timeout )
500 self.execute(
501 cmd="show qos-flow " +
502 arguments,
503 prompt=prompt,
504 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700505 return main.TRUE
506
kelvin-onlab898a6c62015-01-16 14:13:53 -0800507 def show_openflow( self, *options, **def_args ):
508 "Possible Options :[]"
509 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700510 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800511 arguments = arguments + option + ' '
512 prompt = def_args.setdefault( 'prompt', self.prompt )
513 timeout = def_args.setdefault( 'timeout', self.timeout )
514 self.execute(
515 cmd="show openflow " +
516 arguments,
517 prompt=prompt,
518 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700519 return main.TRUE
520
kelvin-onlab898a6c62015-01-16 14:13:53 -0800521 def show_dumpfile( self, *options, **def_args ):
522 "Possible Options :[]"
523 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700524 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800525 arguments = arguments + option + ' '
526 prompt = def_args.setdefault( 'prompt', self.prompt )
527 timeout = def_args.setdefault( 'timeout', self.timeout )
528 self.execute(
529 cmd="show dumpfile " +
530 arguments,
531 prompt=prompt,
532 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700533 return main.TRUE
534
kelvin-onlab898a6c62015-01-16 14:13:53 -0800535 def show_ipv6dhcp( self, *options, **def_args ):
536 "Possible Options :[]"
537 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700538 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800539 arguments = arguments + option + ' '
540 prompt = def_args.setdefault( 'prompt', self.prompt )
541 timeout = def_args.setdefault( 'timeout', self.timeout )
542 self.execute(
543 cmd="show ipv6-dhcp " +
544 arguments,
545 prompt=prompt,
546 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700547 return main.TRUE
548
kelvin-onlab898a6c62015-01-16 14:13:53 -0800549 def show_processes( self, *options, **def_args ):
550 "Possible Options :[]"
551 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700552 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800553 arguments = arguments + option + ' '
554 prompt = def_args.setdefault( 'prompt', self.prompt )
555 timeout = def_args.setdefault( 'timeout', self.timeout )
556 self.execute(
557 cmd="show processes " +
558 arguments,
559 prompt=prompt,
560 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700561 return main.TRUE
562
kelvin-onlab898a6c62015-01-16 14:13:53 -0800563 def show_vrrpstatus( self, *options, **def_args ):
564 "Possible Options :[]"
565 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700566 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800567 arguments = arguments + option + ' '
568 prompt = def_args.setdefault( 'prompt', self.prompt )
569 timeout = def_args.setdefault( 'timeout', self.timeout )
570 self.execute(
571 cmd="show vrrpstatus " +
572 arguments,
573 prompt=prompt,
574 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700575 return main.TRUE
576
kelvin-onlab898a6c62015-01-16 14:13:53 -0800577 def show_interfaces( self, *options, **def_args ):
578 "Possible Options :[]"
579 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700580 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800581 arguments = arguments + option + ' '
582 prompt = def_args.setdefault( 'prompt', self.prompt )
583 timeout = def_args.setdefault( 'timeout', self.timeout )
584 self.execute(
585 cmd="show interfaces " +
586 arguments,
587 prompt=prompt,
588 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700589 return main.TRUE
590
kelvin-onlab898a6c62015-01-16 14:13:53 -0800591 def show_environment( self, *options, **def_args ):
592 "Possible Options :[]"
593 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700594 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800595 arguments = arguments + option + ' '
596 prompt = def_args.setdefault( 'prompt', self.prompt )
597 timeout = def_args.setdefault( 'timeout', self.timeout )
598 self.execute(
599 cmd="show environment " +
600 arguments,
601 prompt=prompt,
602 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700603 return main.TRUE
604
kelvin-onlab898a6c62015-01-16 14:13:53 -0800605 def show_autoconfig( self, *options, **def_args ):
606 "Possible Options :[]"
607 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700608 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800609 arguments = arguments + option + ' '
610 prompt = def_args.setdefault( 'prompt', self.prompt )
611 timeout = def_args.setdefault( 'timeout', self.timeout )
612 self.execute(
613 cmd="show auto-config " +
614 arguments,
615 prompt=prompt,
616 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700617 return main.TRUE
618
kelvin-onlab898a6c62015-01-16 14:13:53 -0800619 def show_techsupport( self, *options, **def_args ):
620 "Possible Options :[]"
621 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700622 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800623 arguments = arguments + option + ' '
624 prompt = def_args.setdefault( 'prompt', self.prompt )
625 timeout = def_args.setdefault( 'timeout', self.timeout )
626 self.execute(
627 cmd="show tech-support " +
628 arguments,
629 prompt=prompt,
630 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700631 return main.TRUE
632
kelvin-onlab898a6c62015-01-16 14:13:53 -0800633 def show_mldsnooping( self, *options, **def_args ):
634 "Possible Options :[]"
635 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700636 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800637 arguments = arguments + option + ' '
638 prompt = def_args.setdefault( 'prompt', self.prompt )
639 timeout = def_args.setdefault( 'timeout', self.timeout )
640 self.execute(
641 cmd="show mld-snooping " +
642 arguments,
643 prompt=prompt,
644 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700645 return main.TRUE
646
kelvin-onlab898a6c62015-01-16 14:13:53 -0800647 def show_igmpsnooping( self, *options, **def_args ):
648 "Possible Options :[]"
649 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700650 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800651 arguments = arguments + option + ' '
652 prompt = def_args.setdefault( 'prompt', self.prompt )
653 timeout = def_args.setdefault( 'timeout', self.timeout )
654 self.execute(
655 cmd="show igmp-snooping " +
656 arguments,
657 prompt=prompt,
658 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700659 return main.TRUE
660
kelvin-onlab898a6c62015-01-16 14:13:53 -0800661 def show_channelgroup( self, *options, **def_args ):
662 "Possible Options :[]"
663 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700664 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800665 arguments = arguments + option + ' '
666 prompt = def_args.setdefault( 'prompt', self.prompt )
667 timeout = def_args.setdefault( 'timeout', self.timeout )
668 self.execute(
669 cmd="show channel-group " +
670 arguments,
671 prompt=prompt,
672 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700673 return main.TRUE
674
kelvin-onlab898a6c62015-01-16 14:13:53 -0800675 def show_spanningtree( self, *options, **def_args ):
676 "Possible Options :[]"
677 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700678 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800679 arguments = arguments + option + ' '
680 prompt = def_args.setdefault( 'prompt', self.prompt )
681 timeout = def_args.setdefault( 'timeout', self.timeout )
682 self.execute(
683 cmd="show spanning-tree " +
684 arguments,
685 prompt=prompt,
686 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700687 return main.TRUE
688
kelvin-onlab898a6c62015-01-16 14:13:53 -0800689 def show_loopdetection( self, *options, **def_args ):
690 "Possible Options :[]"
691 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700692 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800693 arguments = arguments + option + ' '
694 prompt = def_args.setdefault( 'prompt', self.prompt )
695 timeout = def_args.setdefault( 'timeout', self.timeout )
696 self.execute(
697 cmd="show loop-detection " +
698 arguments,
699 prompt=prompt,
700 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700701 return main.TRUE
702
kelvin-onlab898a6c62015-01-16 14:13:53 -0800703 def show_acknowledgments( self, *options, **def_args ):
704 "Possible Options :[' interface ']"
705 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700706 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800707 arguments = arguments + option + ' '
708 prompt = def_args.setdefault( 'prompt', self.prompt )
709 timeout = def_args.setdefault( 'timeout', self.timeout )
710 self.execute(
711 cmd="show acknowledgments " +
712 arguments,
713 prompt=prompt,
714 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700715 return main.TRUE
716
kelvin-onlab898a6c62015-01-16 14:13:53 -0800717 def show_macaddresstable( self, *options, **def_args ):
718 "Possible Options :[]"
719 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700720 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800721 arguments = arguments + option + ' '
722 prompt = def_args.setdefault( 'prompt', self.prompt )
723 timeout = def_args.setdefault( 'timeout', self.timeout )
724 self.execute(
725 cmd="show mac-address-table " +
726 arguments,
727 prompt=prompt,
728 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700729 return main.TRUE
730
kelvin-onlab898a6c62015-01-16 14:13:53 -0800731 def show_configlockstatus( self, *options, **def_args ):
732 "Possible Options :[]"
733 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700734 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800735 arguments = arguments + option + ' '
736 prompt = def_args.setdefault( 'prompt', self.prompt )
737 timeout = def_args.setdefault( 'timeout', self.timeout )
738 self.execute(
739 cmd="show config-lock-status " +
740 arguments,
741 prompt=prompt,
742 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700743 return main.TRUE
744
kelvin-onlab898a6c62015-01-16 14:13:53 -0800745 def show_acknowledgments_interface( self, *options, **def_args ):
746 "Possible Options :[]"
747 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700748 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800749 arguments = arguments + option + ' '
750 prompt = def_args.setdefault( 'prompt', self.prompt )
751 timeout = def_args.setdefault( 'timeout', self.timeout )
752 self.execute(
753 cmd="show acknowledgments interface " +
754 arguments,
755 prompt=prompt,
756 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700757 return main.TRUE