blob: aea470d5cbc1b15c3936947b26f0de2ef68ab7ac [file] [log] [blame]
Jeremy Songsterae01bba2016-07-11 15:39:17 -07001"""
2Modified 2015 by ON.Lab
3
4Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7"""
8
adminbae64d82013-08-01 10:50:15 -07009class NEC:
kelvin-onlab898a6c62015-01-16 14:13:53 -080010
adminbae64d82013-08-01 10:50:15 -070011 def __init__( self ):
12 self.prompt = '(.*)'
kelvin-onlab898a6c62015-01-16 14:13:53 -080013 self.timeout = 60
adminbae64d82013-08-01 10:50:15 -070014
kelvin-onlab898a6c62015-01-16 14:13:53 -080015 def show( self, *options, **def_args ):
16 "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 ']"
17 arguments = ''
adminbae64d82013-08-01 10:50:15 -070018 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080019 arguments = arguments + option + ' '
20 prompt = def_args.setdefault( 'prompt', self.prompt )
21 timeout = def_args.setdefault( 'timeout', self.timeout )
22 self.execute( cmd="show " + arguments, prompt=prompt, timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070023 return main.TRUE
24
kelvin-onlab898a6c62015-01-16 14:13:53 -080025 def show_ip( self, *options, **def_args ):
26 "Possible Options :[]"
27 arguments = ''
adminbae64d82013-08-01 10:50:15 -070028 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080029 arguments = arguments + option + ' '
30 prompt = def_args.setdefault( 'prompt', self.prompt )
31 timeout = def_args.setdefault( 'timeout', self.timeout )
32 self.execute(
33 cmd="show ip " +
34 arguments,
35 prompt=prompt,
36 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070037 return main.TRUE
38
kelvin-onlab898a6c62015-01-16 14:13:53 -080039 def show_mc( self, *options, **def_args ):
40 "Possible Options :[]"
41 arguments = ''
adminbae64d82013-08-01 10:50:15 -070042 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080043 arguments = arguments + option + ' '
44 prompt = def_args.setdefault( 'prompt', self.prompt )
45 timeout = def_args.setdefault( 'timeout', self.timeout )
46 self.execute(
47 cmd="show mc " +
48 arguments,
49 prompt=prompt,
50 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070051 return main.TRUE
52
kelvin-onlab898a6c62015-01-16 14:13:53 -080053 def show_cfm( self, *options, **def_args ):
54 "Possible Options :[]"
55 arguments = ''
adminbae64d82013-08-01 10:50:15 -070056 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080057 arguments = arguments + option + ' '
58 prompt = def_args.setdefault( 'prompt', self.prompt )
59 timeout = def_args.setdefault( 'timeout', self.timeout )
60 self.execute(
61 cmd="show cfm " +
62 arguments,
63 prompt=prompt,
64 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070065 return main.TRUE
66
kelvin-onlab898a6c62015-01-16 14:13:53 -080067 def show_ntp( self, *options, **def_args ):
68 "Possible Options :[]"
69 arguments = ''
adminbae64d82013-08-01 10:50:15 -070070 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080071 arguments = arguments + option + ' '
72 prompt = def_args.setdefault( 'prompt', self.prompt )
73 timeout = def_args.setdefault( 'timeout', self.timeout )
74 self.execute(
75 cmd="show ntp " +
76 arguments,
77 prompt=prompt,
78 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070079 return main.TRUE
80
kelvin-onlab898a6c62015-01-16 14:13:53 -080081 def show_ssh( self, *options, **def_args ):
82 "Possible Options :[]"
83 arguments = ''
adminbae64d82013-08-01 10:50:15 -070084 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080085 arguments = arguments + option + ' '
86 prompt = def_args.setdefault( 'prompt', self.prompt )
87 timeout = def_args.setdefault( 'timeout', self.timeout )
88 self.execute(
89 cmd="show ssh " +
90 arguments,
91 prompt=prompt,
92 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070093 return main.TRUE
94
kelvin-onlab898a6c62015-01-16 14:13:53 -080095 def show_qos( self, *options, **def_args ):
96 "Possible Options :[]"
97 arguments = ''
adminbae64d82013-08-01 10:50:15 -070098 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080099 arguments = arguments + option + ' '
100 prompt = def_args.setdefault( 'prompt', self.prompt )
101 timeout = def_args.setdefault( 'timeout', self.timeout )
102 self.execute(
103 cmd="show qos " +
104 arguments,
105 prompt=prompt,
106 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700107 return main.TRUE
108
kelvin-onlab898a6c62015-01-16 14:13:53 -0800109 def show_cpu( self, *options, **def_args ):
110 "Possible Options :[]"
111 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700112 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800113 arguments = arguments + option + ' '
114 prompt = def_args.setdefault( 'prompt', self.prompt )
115 timeout = def_args.setdefault( 'timeout', self.timeout )
116 self.execute(
117 cmd="show cpu " +
118 arguments,
119 prompt=prompt,
120 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700121 return main.TRUE
122
kelvin-onlab898a6c62015-01-16 14:13:53 -0800123 def show_vlan( self, *options, **def_args ):
124 "Possible Options :[]"
125 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700126 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800127 arguments = arguments + option + ' '
128 prompt = def_args.setdefault( 'prompt', self.prompt )
129 timeout = def_args.setdefault( 'timeout', self.timeout )
130 self.execute(
131 cmd="show vlan " +
132 arguments,
133 prompt=prompt,
134 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700135 return main.TRUE
136
kelvin-onlab898a6c62015-01-16 14:13:53 -0800137 def show_lldp( self, *options, **def_args ):
138 "Possible Options :[]"
139 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700140 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800141 arguments = arguments + option + ' '
142 prompt = def_args.setdefault( 'prompt', self.prompt )
143 timeout = def_args.setdefault( 'timeout', self.timeout )
144 self.execute(
145 cmd="show lldp " +
146 arguments,
147 prompt=prompt,
148 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700149 return main.TRUE
150
kelvin-onlab898a6c62015-01-16 14:13:53 -0800151 def show_dhcp( self, *options, **def_args ):
152 "Possible Options :[]"
153 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700154 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800155 arguments = arguments + option + ' '
156 prompt = def_args.setdefault( 'prompt', self.prompt )
157 timeout = def_args.setdefault( 'timeout', self.timeout )
158 self.execute(
159 cmd="show dhcp " +
160 arguments,
161 prompt=prompt,
162 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700163 return main.TRUE
164
kelvin-onlab898a6c62015-01-16 14:13:53 -0800165 def show_axrp( self, *options, **def_args ):
166 "Possible Options :[]"
167 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700168 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800169 arguments = arguments + option + ' '
170 prompt = def_args.setdefault( 'prompt', self.prompt )
171 timeout = def_args.setdefault( 'timeout', self.timeout )
172 self.execute(
173 cmd="show axrp " +
174 arguments,
175 prompt=prompt,
176 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700177 return main.TRUE
178
kelvin-onlab898a6c62015-01-16 14:13:53 -0800179 def show_oadp( self, *options, **def_args ):
180 "Possible Options :[]"
181 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700182 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800183 arguments = arguments + option + ' '
184 prompt = def_args.setdefault( 'prompt', self.prompt )
185 timeout = def_args.setdefault( 'timeout', self.timeout )
186 self.execute(
187 cmd="show oadp " +
188 arguments,
189 prompt=prompt,
190 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700191 return main.TRUE
192
kelvin-onlab898a6c62015-01-16 14:13:53 -0800193 def show_gsrp( self, *options, **def_args ):
194 "Possible Options :[]"
195 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700196 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800197 arguments = arguments + option + ' '
198 prompt = def_args.setdefault( 'prompt', self.prompt )
199 timeout = def_args.setdefault( 'timeout', self.timeout )
200 self.execute(
201 cmd="show gsrp " +
202 arguments,
203 prompt=prompt,
204 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700205 return main.TRUE
206
kelvin-onlab898a6c62015-01-16 14:13:53 -0800207 def show_port( self, *options, **def_args ):
208 "Possible Options :[]"
209 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700210 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800211 arguments = arguments + option + ' '
212 prompt = def_args.setdefault( 'prompt', self.prompt )
213 timeout = def_args.setdefault( 'timeout', self.timeout )
214 self.execute(
215 cmd="show port " +
216 arguments,
217 prompt=prompt,
218 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700219 return main.TRUE
220
kelvin-onlab898a6c62015-01-16 14:13:53 -0800221 def show_file( self, *options, **def_args ):
222 "Possible Options :[]"
223 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700224 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800225 arguments = arguments + option + ' '
226 prompt = def_args.setdefault( 'prompt', self.prompt )
227 timeout = def_args.setdefault( 'timeout', self.timeout )
228 self.execute(
229 cmd="show file " +
230 arguments,
231 prompt=prompt,
232 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700233 return main.TRUE
234
kelvin-onlab898a6c62015-01-16 14:13:53 -0800235 def show_power( self, *options, **def_args ):
236 "Possible Options :[]"
237 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700238 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800239 arguments = arguments + option + ' '
240 prompt = def_args.setdefault( 'prompt', self.prompt )
241 timeout = def_args.setdefault( 'timeout', self.timeout )
242 self.execute(
243 cmd="show power " +
244 arguments,
245 prompt=prompt,
246 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700247 return main.TRUE
248
kelvin-onlab898a6c62015-01-16 14:13:53 -0800249 def show_clock( self, *options, **def_args ):
250 "Possible Options :[]"
251 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700252 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800253 arguments = arguments + option + ' '
254 prompt = def_args.setdefault( 'prompt', self.prompt )
255 timeout = def_args.setdefault( 'timeout', self.timeout )
256 self.execute(
257 cmd="show clock " +
258 arguments,
259 prompt=prompt,
260 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700261 return main.TRUE
262
kelvin-onlab898a6c62015-01-16 14:13:53 -0800263 def show_dot1x( self, *options, **def_args ):
264 "Possible Options :[]"
265 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700266 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800267 arguments = arguments + option + ' '
268 prompt = def_args.setdefault( 'prompt', self.prompt )
269 timeout = def_args.setdefault( 'timeout', self.timeout )
270 self.execute(
271 cmd="show dot1x " +
272 arguments,
273 prompt=prompt,
274 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700275 return main.TRUE
276
kelvin-onlab898a6c62015-01-16 14:13:53 -0800277 def show_sflow( self, *options, **def_args ):
278 "Possible Options :[]"
279 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700280 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800281 arguments = arguments + option + ' '
282 prompt = def_args.setdefault( 'prompt', self.prompt )
283 timeout = def_args.setdefault( 'timeout', self.timeout )
284 self.execute(
285 cmd="show sflow " +
286 arguments,
287 prompt=prompt,
288 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700289 return main.TRUE
290
kelvin-onlab898a6c62015-01-16 14:13:53 -0800291 def show_track( self, *options, **def_args ):
292 "Possible Options :[]"
293 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700294 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800295 arguments = arguments + option + ' '
296 prompt = def_args.setdefault( 'prompt', self.prompt )
297 timeout = def_args.setdefault( 'timeout', self.timeout )
298 self.execute(
299 cmd="show track " +
300 arguments,
301 prompt=prompt,
302 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700303 return main.TRUE
304
kelvin-onlab898a6c62015-01-16 14:13:53 -0800305 def show_flash( self, *options, **def_args ):
306 "Possible Options :[]"
307 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700308 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800309 arguments = arguments + option + ' '
310 prompt = def_args.setdefault( 'prompt', self.prompt )
311 timeout = def_args.setdefault( 'timeout', self.timeout )
312 self.execute(
313 cmd="show flash " +
314 arguments,
315 prompt=prompt,
316 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700317 return main.TRUE
318
kelvin-onlab898a6c62015-01-16 14:13:53 -0800319 def show_system( self, *options, **def_args ):
320 "Possible Options :[]"
321 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700322 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800323 arguments = arguments + option + ' '
324 prompt = def_args.setdefault( 'prompt', self.prompt )
325 timeout = def_args.setdefault( 'timeout', self.timeout )
326 self.execute(
327 cmd="show system " +
328 arguments,
329 prompt=prompt,
330 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700331 return main.TRUE
332
kelvin-onlab898a6c62015-01-16 14:13:53 -0800333 def show_whoami( self, *options, **def_args ):
334 "Possible Options :[]"
335 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700336 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800337 arguments = arguments + option + ' '
338 prompt = def_args.setdefault( 'prompt', self.prompt )
339 timeout = def_args.setdefault( 'timeout', self.timeout )
340 self.execute(
341 cmd="show whoami " +
342 arguments,
343 prompt=prompt,
344 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700345 return main.TRUE
346
kelvin-onlab898a6c62015-01-16 14:13:53 -0800347 def show_efmoam( self, *options, **def_args ):
348 "Possible Options :[]"
349 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700350 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800351 arguments = arguments + option + ' '
352 prompt = def_args.setdefault( 'prompt', self.prompt )
353 timeout = def_args.setdefault( 'timeout', self.timeout )
354 self.execute(
355 cmd="show efmoam " +
356 arguments,
357 prompt=prompt,
358 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700359 return main.TRUE
360
kelvin-onlab898a6c62015-01-16 14:13:53 -0800361 def show_memory( self, *options, **def_args ):
362 "Possible Options :[]"
363 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700364 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800365 arguments = arguments + option + ' '
366 prompt = def_args.setdefault( 'prompt', self.prompt )
367 timeout = def_args.setdefault( 'timeout', self.timeout )
368 self.execute(
369 cmd="show memory " +
370 arguments,
371 prompt=prompt,
372 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700373 return main.TRUE
374
kelvin-onlab898a6c62015-01-16 14:13:53 -0800375 def show_tcpdump( self, *options, **def_args ):
376 "Possible Options :[]"
377 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700378 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800379 arguments = arguments + option + ' '
380 prompt = def_args.setdefault( 'prompt', self.prompt )
381 timeout = def_args.setdefault( 'timeout', self.timeout )
382 self.execute(
383 cmd="show tcpdump " +
384 arguments,
385 prompt=prompt,
386 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700387 return main.TRUE
388
kelvin-onlab898a6c62015-01-16 14:13:53 -0800389 def show_history( self, *options, **def_args ):
390 "Possible Options :[]"
391 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700392 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800393 arguments = arguments + option + ' '
394 prompt = def_args.setdefault( 'prompt', self.prompt )
395 timeout = def_args.setdefault( 'timeout', self.timeout )
396 self.execute(
397 cmd="show history " +
398 arguments,
399 prompt=prompt,
400 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700401 return main.TRUE
402
kelvin-onlab898a6c62015-01-16 14:13:53 -0800403 def show_logging( self, *options, **def_args ):
404 "Possible Options :[]"
405 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700406 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800407 arguments = arguments + option + ' '
408 prompt = def_args.setdefault( 'prompt', self.prompt )
409 timeout = def_args.setdefault( 'timeout', self.timeout )
410 self.execute(
411 cmd="show logging " +
412 arguments,
413 prompt=prompt,
414 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700415 return main.TRUE
416
kelvin-onlab898a6c62015-01-16 14:13:53 -0800417 def show_license( self, *options, **def_args ):
418 "Possible Options :[]"
419 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700420 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800421 arguments = arguments + option + ' '
422 prompt = def_args.setdefault( 'prompt', self.prompt )
423 timeout = def_args.setdefault( 'timeout', self.timeout )
424 self.execute(
425 cmd="show license " +
426 arguments,
427 prompt=prompt,
428 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700429 return main.TRUE
430
kelvin-onlab898a6c62015-01-16 14:13:53 -0800431 def show_netstat( self, *options, **def_args ):
432 "Possible Options :[]"
433 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700434 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800435 arguments = arguments + option + ' '
436 prompt = def_args.setdefault( 'prompt', self.prompt )
437 timeout = def_args.setdefault( 'timeout', self.timeout )
438 self.execute(
439 cmd="show netstat " +
440 arguments,
441 prompt=prompt,
442 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700443 return main.TRUE
444
kelvin-onlab898a6c62015-01-16 14:13:53 -0800445 def show_version( self, *options, **def_args ):
446 "Possible Options :[]"
447 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700448 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800449 arguments = arguments + option + ' '
450 prompt = def_args.setdefault( 'prompt', self.prompt )
451 timeout = def_args.setdefault( 'timeout', self.timeout )
452 self.execute(
453 cmd="show version " +
454 arguments,
455 prompt=prompt,
456 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700457 return main.TRUE
458
kelvin-onlab898a6c62015-01-16 14:13:53 -0800459 def show_netconf( self, *options, **def_args ):
460 "Possible Options :[]"
461 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700462 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800463 arguments = arguments + option + ' '
464 prompt = def_args.setdefault( 'prompt', self.prompt )
465 timeout = def_args.setdefault( 'timeout', self.timeout )
466 self.execute(
467 cmd="show netconf " +
468 arguments,
469 prompt=prompt,
470 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700471 return main.TRUE
472
kelvin-onlab898a6c62015-01-16 14:13:53 -0800473 def show_ipdual( self, *options, **def_args ):
474 "Possible Options :[]"
475 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700476 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800477 arguments = arguments + option + ' '
478 prompt = def_args.setdefault( 'prompt', self.prompt )
479 timeout = def_args.setdefault( 'timeout', self.timeout )
480 self.execute(
481 cmd="show ip-dual " +
482 arguments,
483 prompt=prompt,
484 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700485 return main.TRUE
486
kelvin-onlab898a6c62015-01-16 14:13:53 -0800487 def show_sessions( self, *options, **def_args ):
488 "Possible Options :[]"
489 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700490 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800491 arguments = arguments + option + ' '
492 prompt = def_args.setdefault( 'prompt', self.prompt )
493 timeout = def_args.setdefault( 'timeout', self.timeout )
494 self.execute(
495 cmd="show sessions " +
496 arguments,
497 prompt=prompt,
498 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700499 return main.TRUE
500
kelvin-onlab898a6c62015-01-16 14:13:53 -0800501 def show_qosflow( self, *options, **def_args ):
502 "Possible Options :[]"
503 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700504 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800505 arguments = arguments + option + ' '
506 prompt = def_args.setdefault( 'prompt', self.prompt )
507 timeout = def_args.setdefault( 'timeout', self.timeout )
508 self.execute(
509 cmd="show qos-flow " +
510 arguments,
511 prompt=prompt,
512 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700513 return main.TRUE
514
kelvin-onlab898a6c62015-01-16 14:13:53 -0800515 def show_openflow( self, *options, **def_args ):
516 "Possible Options :[]"
517 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700518 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800519 arguments = arguments + option + ' '
520 prompt = def_args.setdefault( 'prompt', self.prompt )
521 timeout = def_args.setdefault( 'timeout', self.timeout )
522 self.execute(
523 cmd="show openflow " +
524 arguments,
525 prompt=prompt,
526 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700527 return main.TRUE
528
kelvin-onlab898a6c62015-01-16 14:13:53 -0800529 def show_dumpfile( self, *options, **def_args ):
530 "Possible Options :[]"
531 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700532 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800533 arguments = arguments + option + ' '
534 prompt = def_args.setdefault( 'prompt', self.prompt )
535 timeout = def_args.setdefault( 'timeout', self.timeout )
536 self.execute(
537 cmd="show dumpfile " +
538 arguments,
539 prompt=prompt,
540 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700541 return main.TRUE
542
kelvin-onlab898a6c62015-01-16 14:13:53 -0800543 def show_ipv6dhcp( self, *options, **def_args ):
544 "Possible Options :[]"
545 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700546 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800547 arguments = arguments + option + ' '
548 prompt = def_args.setdefault( 'prompt', self.prompt )
549 timeout = def_args.setdefault( 'timeout', self.timeout )
550 self.execute(
551 cmd="show ipv6-dhcp " +
552 arguments,
553 prompt=prompt,
554 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700555 return main.TRUE
556
kelvin-onlab898a6c62015-01-16 14:13:53 -0800557 def show_processes( self, *options, **def_args ):
558 "Possible Options :[]"
559 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700560 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800561 arguments = arguments + option + ' '
562 prompt = def_args.setdefault( 'prompt', self.prompt )
563 timeout = def_args.setdefault( 'timeout', self.timeout )
564 self.execute(
565 cmd="show processes " +
566 arguments,
567 prompt=prompt,
568 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700569 return main.TRUE
570
kelvin-onlab898a6c62015-01-16 14:13:53 -0800571 def show_vrrpstatus( self, *options, **def_args ):
572 "Possible Options :[]"
573 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700574 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800575 arguments = arguments + option + ' '
576 prompt = def_args.setdefault( 'prompt', self.prompt )
577 timeout = def_args.setdefault( 'timeout', self.timeout )
578 self.execute(
579 cmd="show vrrpstatus " +
580 arguments,
581 prompt=prompt,
582 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700583 return main.TRUE
584
kelvin-onlab898a6c62015-01-16 14:13:53 -0800585 def show_interfaces( self, *options, **def_args ):
586 "Possible Options :[]"
587 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700588 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800589 arguments = arguments + option + ' '
590 prompt = def_args.setdefault( 'prompt', self.prompt )
591 timeout = def_args.setdefault( 'timeout', self.timeout )
592 self.execute(
593 cmd="show interfaces " +
594 arguments,
595 prompt=prompt,
596 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700597 return main.TRUE
598
kelvin-onlab898a6c62015-01-16 14:13:53 -0800599 def show_environment( self, *options, **def_args ):
600 "Possible Options :[]"
601 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700602 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800603 arguments = arguments + option + ' '
604 prompt = def_args.setdefault( 'prompt', self.prompt )
605 timeout = def_args.setdefault( 'timeout', self.timeout )
606 self.execute(
607 cmd="show environment " +
608 arguments,
609 prompt=prompt,
610 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700611 return main.TRUE
612
kelvin-onlab898a6c62015-01-16 14:13:53 -0800613 def show_autoconfig( self, *options, **def_args ):
614 "Possible Options :[]"
615 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700616 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800617 arguments = arguments + option + ' '
618 prompt = def_args.setdefault( 'prompt', self.prompt )
619 timeout = def_args.setdefault( 'timeout', self.timeout )
620 self.execute(
621 cmd="show auto-config " +
622 arguments,
623 prompt=prompt,
624 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700625 return main.TRUE
626
kelvin-onlab898a6c62015-01-16 14:13:53 -0800627 def show_techsupport( self, *options, **def_args ):
628 "Possible Options :[]"
629 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700630 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800631 arguments = arguments + option + ' '
632 prompt = def_args.setdefault( 'prompt', self.prompt )
633 timeout = def_args.setdefault( 'timeout', self.timeout )
634 self.execute(
635 cmd="show tech-support " +
636 arguments,
637 prompt=prompt,
638 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700639 return main.TRUE
640
kelvin-onlab898a6c62015-01-16 14:13:53 -0800641 def show_mldsnooping( self, *options, **def_args ):
642 "Possible Options :[]"
643 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700644 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800645 arguments = arguments + option + ' '
646 prompt = def_args.setdefault( 'prompt', self.prompt )
647 timeout = def_args.setdefault( 'timeout', self.timeout )
648 self.execute(
649 cmd="show mld-snooping " +
650 arguments,
651 prompt=prompt,
652 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700653 return main.TRUE
654
kelvin-onlab898a6c62015-01-16 14:13:53 -0800655 def show_igmpsnooping( self, *options, **def_args ):
656 "Possible Options :[]"
657 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700658 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800659 arguments = arguments + option + ' '
660 prompt = def_args.setdefault( 'prompt', self.prompt )
661 timeout = def_args.setdefault( 'timeout', self.timeout )
662 self.execute(
663 cmd="show igmp-snooping " +
664 arguments,
665 prompt=prompt,
666 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700667 return main.TRUE
668
kelvin-onlab898a6c62015-01-16 14:13:53 -0800669 def show_channelgroup( self, *options, **def_args ):
670 "Possible Options :[]"
671 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700672 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800673 arguments = arguments + option + ' '
674 prompt = def_args.setdefault( 'prompt', self.prompt )
675 timeout = def_args.setdefault( 'timeout', self.timeout )
676 self.execute(
677 cmd="show channel-group " +
678 arguments,
679 prompt=prompt,
680 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700681 return main.TRUE
682
kelvin-onlab898a6c62015-01-16 14:13:53 -0800683 def show_spanningtree( self, *options, **def_args ):
684 "Possible Options :[]"
685 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700686 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800687 arguments = arguments + option + ' '
688 prompt = def_args.setdefault( 'prompt', self.prompt )
689 timeout = def_args.setdefault( 'timeout', self.timeout )
690 self.execute(
691 cmd="show spanning-tree " +
692 arguments,
693 prompt=prompt,
694 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700695 return main.TRUE
696
kelvin-onlab898a6c62015-01-16 14:13:53 -0800697 def show_loopdetection( self, *options, **def_args ):
698 "Possible Options :[]"
699 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700700 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800701 arguments = arguments + option + ' '
702 prompt = def_args.setdefault( 'prompt', self.prompt )
703 timeout = def_args.setdefault( 'timeout', self.timeout )
704 self.execute(
705 cmd="show loop-detection " +
706 arguments,
707 prompt=prompt,
708 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700709 return main.TRUE
710
kelvin-onlab898a6c62015-01-16 14:13:53 -0800711 def show_acknowledgments( self, *options, **def_args ):
712 "Possible Options :[' interface ']"
713 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700714 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800715 arguments = arguments + option + ' '
716 prompt = def_args.setdefault( 'prompt', self.prompt )
717 timeout = def_args.setdefault( 'timeout', self.timeout )
718 self.execute(
719 cmd="show acknowledgments " +
720 arguments,
721 prompt=prompt,
722 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700723 return main.TRUE
724
kelvin-onlab898a6c62015-01-16 14:13:53 -0800725 def show_macaddresstable( self, *options, **def_args ):
726 "Possible Options :[]"
727 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700728 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800729 arguments = arguments + option + ' '
730 prompt = def_args.setdefault( 'prompt', self.prompt )
731 timeout = def_args.setdefault( 'timeout', self.timeout )
732 self.execute(
733 cmd="show mac-address-table " +
734 arguments,
735 prompt=prompt,
736 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700737 return main.TRUE
738
kelvin-onlab898a6c62015-01-16 14:13:53 -0800739 def show_configlockstatus( self, *options, **def_args ):
740 "Possible Options :[]"
741 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700742 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800743 arguments = arguments + option + ' '
744 prompt = def_args.setdefault( 'prompt', self.prompt )
745 timeout = def_args.setdefault( 'timeout', self.timeout )
746 self.execute(
747 cmd="show config-lock-status " +
748 arguments,
749 prompt=prompt,
750 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700751 return main.TRUE
752
kelvin-onlab898a6c62015-01-16 14:13:53 -0800753 def show_acknowledgments_interface( self, *options, **def_args ):
754 "Possible Options :[]"
755 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700756 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800757 arguments = arguments + option + ' '
758 prompt = def_args.setdefault( 'prompt', self.prompt )
759 timeout = def_args.setdefault( 'timeout', self.timeout )
760 self.execute(
761 cmd="show acknowledgments interface " +
762 arguments,
763 prompt=prompt,
764 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700765 return main.TRUE