blob: b04b95caa17a77ac2b875fbb173d8a408e6bc7f6 [file] [log] [blame]
Jeremy Songsterae01bba2016-07-11 15:39:17 -07001"""
Jeremy Ronquillo4d5f1d02017-10-13 20:23:57 +00002Copyright 2015 Open Networking Foundation (ONF)
Jeremy Songsterae01bba2016-07-11 15:39:17 -07003
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>
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07007
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 ( at your option ) any later version.
12
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
Jeremy Songsterae01bba2016-07-11 15:39:17 -070020"""
Jeremy Ronquillo4d5f1d02017-10-13 20:23:57 +000021
adminbae64d82013-08-01 10:50:15 -070022class NEC:
kelvin-onlab898a6c62015-01-16 14:13:53 -080023
adminbae64d82013-08-01 10:50:15 -070024 def __init__( self ):
25 self.prompt = '(.*)'
kelvin-onlab898a6c62015-01-16 14:13:53 -080026 self.timeout = 60
adminbae64d82013-08-01 10:50:15 -070027
kelvin-onlab898a6c62015-01-16 14:13:53 -080028 def show( self, *options, **def_args ):
29 "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 ']"
30 arguments = ''
adminbae64d82013-08-01 10:50:15 -070031 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080032 arguments = arguments + option + ' '
33 prompt = def_args.setdefault( 'prompt', self.prompt )
34 timeout = def_args.setdefault( 'timeout', self.timeout )
35 self.execute( cmd="show " + arguments, prompt=prompt, timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070036 return main.TRUE
37
kelvin-onlab898a6c62015-01-16 14:13:53 -080038 def show_ip( self, *options, **def_args ):
39 "Possible Options :[]"
40 arguments = ''
adminbae64d82013-08-01 10:50:15 -070041 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080042 arguments = arguments + option + ' '
43 prompt = def_args.setdefault( 'prompt', self.prompt )
44 timeout = def_args.setdefault( 'timeout', self.timeout )
45 self.execute(
46 cmd="show ip " +
47 arguments,
48 prompt=prompt,
49 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070050 return main.TRUE
51
kelvin-onlab898a6c62015-01-16 14:13:53 -080052 def show_mc( self, *options, **def_args ):
53 "Possible Options :[]"
54 arguments = ''
adminbae64d82013-08-01 10:50:15 -070055 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080056 arguments = arguments + option + ' '
57 prompt = def_args.setdefault( 'prompt', self.prompt )
58 timeout = def_args.setdefault( 'timeout', self.timeout )
59 self.execute(
60 cmd="show mc " +
61 arguments,
62 prompt=prompt,
63 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070064 return main.TRUE
65
kelvin-onlab898a6c62015-01-16 14:13:53 -080066 def show_cfm( self, *options, **def_args ):
67 "Possible Options :[]"
68 arguments = ''
adminbae64d82013-08-01 10:50:15 -070069 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080070 arguments = arguments + option + ' '
71 prompt = def_args.setdefault( 'prompt', self.prompt )
72 timeout = def_args.setdefault( 'timeout', self.timeout )
73 self.execute(
74 cmd="show cfm " +
75 arguments,
76 prompt=prompt,
77 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070078 return main.TRUE
79
kelvin-onlab898a6c62015-01-16 14:13:53 -080080 def show_ntp( self, *options, **def_args ):
81 "Possible Options :[]"
82 arguments = ''
adminbae64d82013-08-01 10:50:15 -070083 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080084 arguments = arguments + option + ' '
85 prompt = def_args.setdefault( 'prompt', self.prompt )
86 timeout = def_args.setdefault( 'timeout', self.timeout )
87 self.execute(
88 cmd="show ntp " +
89 arguments,
90 prompt=prompt,
91 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070092 return main.TRUE
93
kelvin-onlab898a6c62015-01-16 14:13:53 -080094 def show_ssh( self, *options, **def_args ):
95 "Possible Options :[]"
96 arguments = ''
adminbae64d82013-08-01 10:50:15 -070097 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080098 arguments = arguments + option + ' '
99 prompt = def_args.setdefault( 'prompt', self.prompt )
100 timeout = def_args.setdefault( 'timeout', self.timeout )
101 self.execute(
102 cmd="show ssh " +
103 arguments,
104 prompt=prompt,
105 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700106 return main.TRUE
107
kelvin-onlab898a6c62015-01-16 14:13:53 -0800108 def show_qos( self, *options, **def_args ):
109 "Possible Options :[]"
110 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700111 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800112 arguments = arguments + option + ' '
113 prompt = def_args.setdefault( 'prompt', self.prompt )
114 timeout = def_args.setdefault( 'timeout', self.timeout )
115 self.execute(
116 cmd="show qos " +
117 arguments,
118 prompt=prompt,
119 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700120 return main.TRUE
121
kelvin-onlab898a6c62015-01-16 14:13:53 -0800122 def show_cpu( self, *options, **def_args ):
123 "Possible Options :[]"
124 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700125 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800126 arguments = arguments + option + ' '
127 prompt = def_args.setdefault( 'prompt', self.prompt )
128 timeout = def_args.setdefault( 'timeout', self.timeout )
129 self.execute(
130 cmd="show cpu " +
131 arguments,
132 prompt=prompt,
133 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700134 return main.TRUE
135
kelvin-onlab898a6c62015-01-16 14:13:53 -0800136 def show_vlan( self, *options, **def_args ):
137 "Possible Options :[]"
138 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700139 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800140 arguments = arguments + option + ' '
141 prompt = def_args.setdefault( 'prompt', self.prompt )
142 timeout = def_args.setdefault( 'timeout', self.timeout )
143 self.execute(
144 cmd="show vlan " +
145 arguments,
146 prompt=prompt,
147 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700148 return main.TRUE
149
kelvin-onlab898a6c62015-01-16 14:13:53 -0800150 def show_lldp( self, *options, **def_args ):
151 "Possible Options :[]"
152 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700153 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800154 arguments = arguments + option + ' '
155 prompt = def_args.setdefault( 'prompt', self.prompt )
156 timeout = def_args.setdefault( 'timeout', self.timeout )
157 self.execute(
158 cmd="show lldp " +
159 arguments,
160 prompt=prompt,
161 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700162 return main.TRUE
163
kelvin-onlab898a6c62015-01-16 14:13:53 -0800164 def show_dhcp( self, *options, **def_args ):
165 "Possible Options :[]"
166 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700167 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800168 arguments = arguments + option + ' '
169 prompt = def_args.setdefault( 'prompt', self.prompt )
170 timeout = def_args.setdefault( 'timeout', self.timeout )
171 self.execute(
172 cmd="show dhcp " +
173 arguments,
174 prompt=prompt,
175 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700176 return main.TRUE
177
kelvin-onlab898a6c62015-01-16 14:13:53 -0800178 def show_axrp( self, *options, **def_args ):
179 "Possible Options :[]"
180 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700181 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800182 arguments = arguments + option + ' '
183 prompt = def_args.setdefault( 'prompt', self.prompt )
184 timeout = def_args.setdefault( 'timeout', self.timeout )
185 self.execute(
186 cmd="show axrp " +
187 arguments,
188 prompt=prompt,
189 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700190 return main.TRUE
191
kelvin-onlab898a6c62015-01-16 14:13:53 -0800192 def show_oadp( self, *options, **def_args ):
193 "Possible Options :[]"
194 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700195 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800196 arguments = arguments + option + ' '
197 prompt = def_args.setdefault( 'prompt', self.prompt )
198 timeout = def_args.setdefault( 'timeout', self.timeout )
199 self.execute(
200 cmd="show oadp " +
201 arguments,
202 prompt=prompt,
203 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700204 return main.TRUE
205
kelvin-onlab898a6c62015-01-16 14:13:53 -0800206 def show_gsrp( self, *options, **def_args ):
207 "Possible Options :[]"
208 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700209 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800210 arguments = arguments + option + ' '
211 prompt = def_args.setdefault( 'prompt', self.prompt )
212 timeout = def_args.setdefault( 'timeout', self.timeout )
213 self.execute(
214 cmd="show gsrp " +
215 arguments,
216 prompt=prompt,
217 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700218 return main.TRUE
219
kelvin-onlab898a6c62015-01-16 14:13:53 -0800220 def show_port( self, *options, **def_args ):
221 "Possible Options :[]"
222 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700223 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800224 arguments = arguments + option + ' '
225 prompt = def_args.setdefault( 'prompt', self.prompt )
226 timeout = def_args.setdefault( 'timeout', self.timeout )
227 self.execute(
228 cmd="show port " +
229 arguments,
230 prompt=prompt,
231 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700232 return main.TRUE
233
kelvin-onlab898a6c62015-01-16 14:13:53 -0800234 def show_file( self, *options, **def_args ):
235 "Possible Options :[]"
236 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700237 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800238 arguments = arguments + option + ' '
239 prompt = def_args.setdefault( 'prompt', self.prompt )
240 timeout = def_args.setdefault( 'timeout', self.timeout )
241 self.execute(
242 cmd="show file " +
243 arguments,
244 prompt=prompt,
245 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700246 return main.TRUE
247
kelvin-onlab898a6c62015-01-16 14:13:53 -0800248 def show_power( self, *options, **def_args ):
249 "Possible Options :[]"
250 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700251 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800252 arguments = arguments + option + ' '
253 prompt = def_args.setdefault( 'prompt', self.prompt )
254 timeout = def_args.setdefault( 'timeout', self.timeout )
255 self.execute(
256 cmd="show power " +
257 arguments,
258 prompt=prompt,
259 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700260 return main.TRUE
261
kelvin-onlab898a6c62015-01-16 14:13:53 -0800262 def show_clock( self, *options, **def_args ):
263 "Possible Options :[]"
264 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700265 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800266 arguments = arguments + option + ' '
267 prompt = def_args.setdefault( 'prompt', self.prompt )
268 timeout = def_args.setdefault( 'timeout', self.timeout )
269 self.execute(
270 cmd="show clock " +
271 arguments,
272 prompt=prompt,
273 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700274 return main.TRUE
275
kelvin-onlab898a6c62015-01-16 14:13:53 -0800276 def show_dot1x( self, *options, **def_args ):
277 "Possible Options :[]"
278 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700279 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800280 arguments = arguments + option + ' '
281 prompt = def_args.setdefault( 'prompt', self.prompt )
282 timeout = def_args.setdefault( 'timeout', self.timeout )
283 self.execute(
284 cmd="show dot1x " +
285 arguments,
286 prompt=prompt,
287 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700288 return main.TRUE
289
kelvin-onlab898a6c62015-01-16 14:13:53 -0800290 def show_sflow( self, *options, **def_args ):
291 "Possible Options :[]"
292 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700293 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800294 arguments = arguments + option + ' '
295 prompt = def_args.setdefault( 'prompt', self.prompt )
296 timeout = def_args.setdefault( 'timeout', self.timeout )
297 self.execute(
298 cmd="show sflow " +
299 arguments,
300 prompt=prompt,
301 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700302 return main.TRUE
303
kelvin-onlab898a6c62015-01-16 14:13:53 -0800304 def show_track( self, *options, **def_args ):
305 "Possible Options :[]"
306 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700307 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800308 arguments = arguments + option + ' '
309 prompt = def_args.setdefault( 'prompt', self.prompt )
310 timeout = def_args.setdefault( 'timeout', self.timeout )
311 self.execute(
312 cmd="show track " +
313 arguments,
314 prompt=prompt,
315 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700316 return main.TRUE
317
kelvin-onlab898a6c62015-01-16 14:13:53 -0800318 def show_flash( self, *options, **def_args ):
319 "Possible Options :[]"
320 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700321 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800322 arguments = arguments + option + ' '
323 prompt = def_args.setdefault( 'prompt', self.prompt )
324 timeout = def_args.setdefault( 'timeout', self.timeout )
325 self.execute(
326 cmd="show flash " +
327 arguments,
328 prompt=prompt,
329 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700330 return main.TRUE
331
kelvin-onlab898a6c62015-01-16 14:13:53 -0800332 def show_system( self, *options, **def_args ):
333 "Possible Options :[]"
334 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700335 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800336 arguments = arguments + option + ' '
337 prompt = def_args.setdefault( 'prompt', self.prompt )
338 timeout = def_args.setdefault( 'timeout', self.timeout )
339 self.execute(
340 cmd="show system " +
341 arguments,
342 prompt=prompt,
343 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700344 return main.TRUE
345
kelvin-onlab898a6c62015-01-16 14:13:53 -0800346 def show_whoami( self, *options, **def_args ):
347 "Possible Options :[]"
348 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700349 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800350 arguments = arguments + option + ' '
351 prompt = def_args.setdefault( 'prompt', self.prompt )
352 timeout = def_args.setdefault( 'timeout', self.timeout )
353 self.execute(
354 cmd="show whoami " +
355 arguments,
356 prompt=prompt,
357 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700358 return main.TRUE
359
kelvin-onlab898a6c62015-01-16 14:13:53 -0800360 def show_efmoam( self, *options, **def_args ):
361 "Possible Options :[]"
362 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700363 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800364 arguments = arguments + option + ' '
365 prompt = def_args.setdefault( 'prompt', self.prompt )
366 timeout = def_args.setdefault( 'timeout', self.timeout )
367 self.execute(
368 cmd="show efmoam " +
369 arguments,
370 prompt=prompt,
371 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700372 return main.TRUE
373
kelvin-onlab898a6c62015-01-16 14:13:53 -0800374 def show_memory( self, *options, **def_args ):
375 "Possible Options :[]"
376 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700377 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800378 arguments = arguments + option + ' '
379 prompt = def_args.setdefault( 'prompt', self.prompt )
380 timeout = def_args.setdefault( 'timeout', self.timeout )
381 self.execute(
382 cmd="show memory " +
383 arguments,
384 prompt=prompt,
385 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700386 return main.TRUE
387
kelvin-onlab898a6c62015-01-16 14:13:53 -0800388 def show_tcpdump( self, *options, **def_args ):
389 "Possible Options :[]"
390 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700391 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800392 arguments = arguments + option + ' '
393 prompt = def_args.setdefault( 'prompt', self.prompt )
394 timeout = def_args.setdefault( 'timeout', self.timeout )
395 self.execute(
396 cmd="show tcpdump " +
397 arguments,
398 prompt=prompt,
399 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700400 return main.TRUE
401
kelvin-onlab898a6c62015-01-16 14:13:53 -0800402 def show_history( self, *options, **def_args ):
403 "Possible Options :[]"
404 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700405 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800406 arguments = arguments + option + ' '
407 prompt = def_args.setdefault( 'prompt', self.prompt )
408 timeout = def_args.setdefault( 'timeout', self.timeout )
409 self.execute(
410 cmd="show history " +
411 arguments,
412 prompt=prompt,
413 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700414 return main.TRUE
415
kelvin-onlab898a6c62015-01-16 14:13:53 -0800416 def show_logging( self, *options, **def_args ):
417 "Possible Options :[]"
418 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700419 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800420 arguments = arguments + option + ' '
421 prompt = def_args.setdefault( 'prompt', self.prompt )
422 timeout = def_args.setdefault( 'timeout', self.timeout )
423 self.execute(
424 cmd="show logging " +
425 arguments,
426 prompt=prompt,
427 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700428 return main.TRUE
429
kelvin-onlab898a6c62015-01-16 14:13:53 -0800430 def show_license( self, *options, **def_args ):
431 "Possible Options :[]"
432 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700433 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800434 arguments = arguments + option + ' '
435 prompt = def_args.setdefault( 'prompt', self.prompt )
436 timeout = def_args.setdefault( 'timeout', self.timeout )
437 self.execute(
438 cmd="show license " +
439 arguments,
440 prompt=prompt,
441 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700442 return main.TRUE
443
kelvin-onlab898a6c62015-01-16 14:13:53 -0800444 def show_netstat( self, *options, **def_args ):
445 "Possible Options :[]"
446 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700447 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800448 arguments = arguments + option + ' '
449 prompt = def_args.setdefault( 'prompt', self.prompt )
450 timeout = def_args.setdefault( 'timeout', self.timeout )
451 self.execute(
452 cmd="show netstat " +
453 arguments,
454 prompt=prompt,
455 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700456 return main.TRUE
457
kelvin-onlab898a6c62015-01-16 14:13:53 -0800458 def show_version( self, *options, **def_args ):
459 "Possible Options :[]"
460 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700461 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800462 arguments = arguments + option + ' '
463 prompt = def_args.setdefault( 'prompt', self.prompt )
464 timeout = def_args.setdefault( 'timeout', self.timeout )
465 self.execute(
466 cmd="show version " +
467 arguments,
468 prompt=prompt,
469 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700470 return main.TRUE
471
kelvin-onlab898a6c62015-01-16 14:13:53 -0800472 def show_netconf( self, *options, **def_args ):
473 "Possible Options :[]"
474 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700475 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800476 arguments = arguments + option + ' '
477 prompt = def_args.setdefault( 'prompt', self.prompt )
478 timeout = def_args.setdefault( 'timeout', self.timeout )
479 self.execute(
480 cmd="show netconf " +
481 arguments,
482 prompt=prompt,
483 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700484 return main.TRUE
485
kelvin-onlab898a6c62015-01-16 14:13:53 -0800486 def show_ipdual( self, *options, **def_args ):
487 "Possible Options :[]"
488 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700489 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800490 arguments = arguments + option + ' '
491 prompt = def_args.setdefault( 'prompt', self.prompt )
492 timeout = def_args.setdefault( 'timeout', self.timeout )
493 self.execute(
494 cmd="show ip-dual " +
495 arguments,
496 prompt=prompt,
497 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700498 return main.TRUE
499
kelvin-onlab898a6c62015-01-16 14:13:53 -0800500 def show_sessions( self, *options, **def_args ):
501 "Possible Options :[]"
502 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700503 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800504 arguments = arguments + option + ' '
505 prompt = def_args.setdefault( 'prompt', self.prompt )
506 timeout = def_args.setdefault( 'timeout', self.timeout )
507 self.execute(
508 cmd="show sessions " +
509 arguments,
510 prompt=prompt,
511 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700512 return main.TRUE
513
kelvin-onlab898a6c62015-01-16 14:13:53 -0800514 def show_qosflow( self, *options, **def_args ):
515 "Possible Options :[]"
516 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700517 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800518 arguments = arguments + option + ' '
519 prompt = def_args.setdefault( 'prompt', self.prompt )
520 timeout = def_args.setdefault( 'timeout', self.timeout )
521 self.execute(
522 cmd="show qos-flow " +
523 arguments,
524 prompt=prompt,
525 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700526 return main.TRUE
527
kelvin-onlab898a6c62015-01-16 14:13:53 -0800528 def show_openflow( self, *options, **def_args ):
529 "Possible Options :[]"
530 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700531 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800532 arguments = arguments + option + ' '
533 prompt = def_args.setdefault( 'prompt', self.prompt )
534 timeout = def_args.setdefault( 'timeout', self.timeout )
535 self.execute(
536 cmd="show openflow " +
537 arguments,
538 prompt=prompt,
539 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700540 return main.TRUE
541
kelvin-onlab898a6c62015-01-16 14:13:53 -0800542 def show_dumpfile( self, *options, **def_args ):
543 "Possible Options :[]"
544 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700545 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800546 arguments = arguments + option + ' '
547 prompt = def_args.setdefault( 'prompt', self.prompt )
548 timeout = def_args.setdefault( 'timeout', self.timeout )
549 self.execute(
550 cmd="show dumpfile " +
551 arguments,
552 prompt=prompt,
553 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700554 return main.TRUE
555
kelvin-onlab898a6c62015-01-16 14:13:53 -0800556 def show_ipv6dhcp( self, *options, **def_args ):
557 "Possible Options :[]"
558 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700559 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800560 arguments = arguments + option + ' '
561 prompt = def_args.setdefault( 'prompt', self.prompt )
562 timeout = def_args.setdefault( 'timeout', self.timeout )
563 self.execute(
564 cmd="show ipv6-dhcp " +
565 arguments,
566 prompt=prompt,
567 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700568 return main.TRUE
569
kelvin-onlab898a6c62015-01-16 14:13:53 -0800570 def show_processes( self, *options, **def_args ):
571 "Possible Options :[]"
572 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700573 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800574 arguments = arguments + option + ' '
575 prompt = def_args.setdefault( 'prompt', self.prompt )
576 timeout = def_args.setdefault( 'timeout', self.timeout )
577 self.execute(
578 cmd="show processes " +
579 arguments,
580 prompt=prompt,
581 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700582 return main.TRUE
583
kelvin-onlab898a6c62015-01-16 14:13:53 -0800584 def show_vrrpstatus( self, *options, **def_args ):
585 "Possible Options :[]"
586 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700587 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800588 arguments = arguments + option + ' '
589 prompt = def_args.setdefault( 'prompt', self.prompt )
590 timeout = def_args.setdefault( 'timeout', self.timeout )
591 self.execute(
592 cmd="show vrrpstatus " +
593 arguments,
594 prompt=prompt,
595 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700596 return main.TRUE
597
kelvin-onlab898a6c62015-01-16 14:13:53 -0800598 def show_interfaces( self, *options, **def_args ):
599 "Possible Options :[]"
600 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700601 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800602 arguments = arguments + option + ' '
603 prompt = def_args.setdefault( 'prompt', self.prompt )
604 timeout = def_args.setdefault( 'timeout', self.timeout )
605 self.execute(
606 cmd="show interfaces " +
607 arguments,
608 prompt=prompt,
609 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700610 return main.TRUE
611
kelvin-onlab898a6c62015-01-16 14:13:53 -0800612 def show_environment( self, *options, **def_args ):
613 "Possible Options :[]"
614 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700615 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800616 arguments = arguments + option + ' '
617 prompt = def_args.setdefault( 'prompt', self.prompt )
618 timeout = def_args.setdefault( 'timeout', self.timeout )
619 self.execute(
620 cmd="show environment " +
621 arguments,
622 prompt=prompt,
623 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700624 return main.TRUE
625
kelvin-onlab898a6c62015-01-16 14:13:53 -0800626 def show_autoconfig( self, *options, **def_args ):
627 "Possible Options :[]"
628 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700629 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800630 arguments = arguments + option + ' '
631 prompt = def_args.setdefault( 'prompt', self.prompt )
632 timeout = def_args.setdefault( 'timeout', self.timeout )
633 self.execute(
634 cmd="show auto-config " +
635 arguments,
636 prompt=prompt,
637 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700638 return main.TRUE
639
kelvin-onlab898a6c62015-01-16 14:13:53 -0800640 def show_techsupport( self, *options, **def_args ):
641 "Possible Options :[]"
642 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700643 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800644 arguments = arguments + option + ' '
645 prompt = def_args.setdefault( 'prompt', self.prompt )
646 timeout = def_args.setdefault( 'timeout', self.timeout )
647 self.execute(
648 cmd="show tech-support " +
649 arguments,
650 prompt=prompt,
651 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700652 return main.TRUE
653
kelvin-onlab898a6c62015-01-16 14:13:53 -0800654 def show_mldsnooping( self, *options, **def_args ):
655 "Possible Options :[]"
656 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700657 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800658 arguments = arguments + option + ' '
659 prompt = def_args.setdefault( 'prompt', self.prompt )
660 timeout = def_args.setdefault( 'timeout', self.timeout )
661 self.execute(
662 cmd="show mld-snooping " +
663 arguments,
664 prompt=prompt,
665 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700666 return main.TRUE
667
kelvin-onlab898a6c62015-01-16 14:13:53 -0800668 def show_igmpsnooping( self, *options, **def_args ):
669 "Possible Options :[]"
670 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700671 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800672 arguments = arguments + option + ' '
673 prompt = def_args.setdefault( 'prompt', self.prompt )
674 timeout = def_args.setdefault( 'timeout', self.timeout )
675 self.execute(
676 cmd="show igmp-snooping " +
677 arguments,
678 prompt=prompt,
679 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700680 return main.TRUE
681
kelvin-onlab898a6c62015-01-16 14:13:53 -0800682 def show_channelgroup( self, *options, **def_args ):
683 "Possible Options :[]"
684 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700685 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800686 arguments = arguments + option + ' '
687 prompt = def_args.setdefault( 'prompt', self.prompt )
688 timeout = def_args.setdefault( 'timeout', self.timeout )
689 self.execute(
690 cmd="show channel-group " +
691 arguments,
692 prompt=prompt,
693 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700694 return main.TRUE
695
kelvin-onlab898a6c62015-01-16 14:13:53 -0800696 def show_spanningtree( self, *options, **def_args ):
697 "Possible Options :[]"
698 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700699 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800700 arguments = arguments + option + ' '
701 prompt = def_args.setdefault( 'prompt', self.prompt )
702 timeout = def_args.setdefault( 'timeout', self.timeout )
703 self.execute(
704 cmd="show spanning-tree " +
705 arguments,
706 prompt=prompt,
707 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700708 return main.TRUE
709
kelvin-onlab898a6c62015-01-16 14:13:53 -0800710 def show_loopdetection( self, *options, **def_args ):
711 "Possible Options :[]"
712 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700713 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800714 arguments = arguments + option + ' '
715 prompt = def_args.setdefault( 'prompt', self.prompt )
716 timeout = def_args.setdefault( 'timeout', self.timeout )
717 self.execute(
718 cmd="show loop-detection " +
719 arguments,
720 prompt=prompt,
721 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700722 return main.TRUE
723
kelvin-onlab898a6c62015-01-16 14:13:53 -0800724 def show_acknowledgments( self, *options, **def_args ):
725 "Possible Options :[' interface ']"
726 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700727 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800728 arguments = arguments + option + ' '
729 prompt = def_args.setdefault( 'prompt', self.prompt )
730 timeout = def_args.setdefault( 'timeout', self.timeout )
731 self.execute(
732 cmd="show acknowledgments " +
733 arguments,
734 prompt=prompt,
735 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700736 return main.TRUE
737
kelvin-onlab898a6c62015-01-16 14:13:53 -0800738 def show_macaddresstable( self, *options, **def_args ):
739 "Possible Options :[]"
740 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700741 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800742 arguments = arguments + option + ' '
743 prompt = def_args.setdefault( 'prompt', self.prompt )
744 timeout = def_args.setdefault( 'timeout', self.timeout )
745 self.execute(
746 cmd="show mac-address-table " +
747 arguments,
748 prompt=prompt,
749 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700750 return main.TRUE
751
kelvin-onlab898a6c62015-01-16 14:13:53 -0800752 def show_configlockstatus( self, *options, **def_args ):
753 "Possible Options :[]"
754 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700755 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800756 arguments = arguments + option + ' '
757 prompt = def_args.setdefault( 'prompt', self.prompt )
758 timeout = def_args.setdefault( 'timeout', self.timeout )
759 self.execute(
760 cmd="show config-lock-status " +
761 arguments,
762 prompt=prompt,
763 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700764 return main.TRUE
765
kelvin-onlab898a6c62015-01-16 14:13:53 -0800766 def show_acknowledgments_interface( self, *options, **def_args ):
767 "Possible Options :[]"
768 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700769 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800770 arguments = arguments + option + ' '
771 prompt = def_args.setdefault( 'prompt', self.prompt )
772 timeout = def_args.setdefault( 'timeout', self.timeout )
773 self.execute(
774 cmd="show acknowledgments interface " +
775 arguments,
776 prompt=prompt,
777 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700778 return main.TRUE