blob: 9ab454d36e0e89755aae83b69ca686a23f4086d3 [file] [log] [blame]
Jeremy Songsterae01bba2016-07-11 15:39:17 -07001"""
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -07002Copyright 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"""
adminbae64d82013-08-01 10:50:15 -070021class NEC:
kelvin-onlab898a6c62015-01-16 14:13:53 -080022
adminbae64d82013-08-01 10:50:15 -070023 def __init__( self ):
24 self.prompt = '(.*)'
kelvin-onlab898a6c62015-01-16 14:13:53 -080025 self.timeout = 60
adminbae64d82013-08-01 10:50:15 -070026
kelvin-onlab898a6c62015-01-16 14:13:53 -080027 def show( self, *options, **def_args ):
28 "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 ']"
29 arguments = ''
adminbae64d82013-08-01 10:50:15 -070030 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080031 arguments = arguments + option + ' '
32 prompt = def_args.setdefault( 'prompt', self.prompt )
33 timeout = def_args.setdefault( 'timeout', self.timeout )
34 self.execute( cmd="show " + arguments, prompt=prompt, timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070035 return main.TRUE
36
kelvin-onlab898a6c62015-01-16 14:13:53 -080037 def show_ip( self, *options, **def_args ):
38 "Possible Options :[]"
39 arguments = ''
adminbae64d82013-08-01 10:50:15 -070040 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080041 arguments = arguments + option + ' '
42 prompt = def_args.setdefault( 'prompt', self.prompt )
43 timeout = def_args.setdefault( 'timeout', self.timeout )
44 self.execute(
45 cmd="show ip " +
46 arguments,
47 prompt=prompt,
48 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070049 return main.TRUE
50
kelvin-onlab898a6c62015-01-16 14:13:53 -080051 def show_mc( self, *options, **def_args ):
52 "Possible Options :[]"
53 arguments = ''
adminbae64d82013-08-01 10:50:15 -070054 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080055 arguments = arguments + option + ' '
56 prompt = def_args.setdefault( 'prompt', self.prompt )
57 timeout = def_args.setdefault( 'timeout', self.timeout )
58 self.execute(
59 cmd="show mc " +
60 arguments,
61 prompt=prompt,
62 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070063 return main.TRUE
64
kelvin-onlab898a6c62015-01-16 14:13:53 -080065 def show_cfm( self, *options, **def_args ):
66 "Possible Options :[]"
67 arguments = ''
adminbae64d82013-08-01 10:50:15 -070068 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080069 arguments = arguments + option + ' '
70 prompt = def_args.setdefault( 'prompt', self.prompt )
71 timeout = def_args.setdefault( 'timeout', self.timeout )
72 self.execute(
73 cmd="show cfm " +
74 arguments,
75 prompt=prompt,
76 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070077 return main.TRUE
78
kelvin-onlab898a6c62015-01-16 14:13:53 -080079 def show_ntp( self, *options, **def_args ):
80 "Possible Options :[]"
81 arguments = ''
adminbae64d82013-08-01 10:50:15 -070082 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080083 arguments = arguments + option + ' '
84 prompt = def_args.setdefault( 'prompt', self.prompt )
85 timeout = def_args.setdefault( 'timeout', self.timeout )
86 self.execute(
87 cmd="show ntp " +
88 arguments,
89 prompt=prompt,
90 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -070091 return main.TRUE
92
kelvin-onlab898a6c62015-01-16 14:13:53 -080093 def show_ssh( self, *options, **def_args ):
94 "Possible Options :[]"
95 arguments = ''
adminbae64d82013-08-01 10:50:15 -070096 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -080097 arguments = arguments + option + ' '
98 prompt = def_args.setdefault( 'prompt', self.prompt )
99 timeout = def_args.setdefault( 'timeout', self.timeout )
100 self.execute(
101 cmd="show ssh " +
102 arguments,
103 prompt=prompt,
104 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700105 return main.TRUE
106
kelvin-onlab898a6c62015-01-16 14:13:53 -0800107 def show_qos( self, *options, **def_args ):
108 "Possible Options :[]"
109 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700110 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800111 arguments = arguments + option + ' '
112 prompt = def_args.setdefault( 'prompt', self.prompt )
113 timeout = def_args.setdefault( 'timeout', self.timeout )
114 self.execute(
115 cmd="show qos " +
116 arguments,
117 prompt=prompt,
118 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700119 return main.TRUE
120
kelvin-onlab898a6c62015-01-16 14:13:53 -0800121 def show_cpu( self, *options, **def_args ):
122 "Possible Options :[]"
123 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700124 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800125 arguments = arguments + option + ' '
126 prompt = def_args.setdefault( 'prompt', self.prompt )
127 timeout = def_args.setdefault( 'timeout', self.timeout )
128 self.execute(
129 cmd="show cpu " +
130 arguments,
131 prompt=prompt,
132 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700133 return main.TRUE
134
kelvin-onlab898a6c62015-01-16 14:13:53 -0800135 def show_vlan( self, *options, **def_args ):
136 "Possible Options :[]"
137 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700138 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800139 arguments = arguments + option + ' '
140 prompt = def_args.setdefault( 'prompt', self.prompt )
141 timeout = def_args.setdefault( 'timeout', self.timeout )
142 self.execute(
143 cmd="show vlan " +
144 arguments,
145 prompt=prompt,
146 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700147 return main.TRUE
148
kelvin-onlab898a6c62015-01-16 14:13:53 -0800149 def show_lldp( self, *options, **def_args ):
150 "Possible Options :[]"
151 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700152 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800153 arguments = arguments + option + ' '
154 prompt = def_args.setdefault( 'prompt', self.prompt )
155 timeout = def_args.setdefault( 'timeout', self.timeout )
156 self.execute(
157 cmd="show lldp " +
158 arguments,
159 prompt=prompt,
160 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700161 return main.TRUE
162
kelvin-onlab898a6c62015-01-16 14:13:53 -0800163 def show_dhcp( self, *options, **def_args ):
164 "Possible Options :[]"
165 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700166 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800167 arguments = arguments + option + ' '
168 prompt = def_args.setdefault( 'prompt', self.prompt )
169 timeout = def_args.setdefault( 'timeout', self.timeout )
170 self.execute(
171 cmd="show dhcp " +
172 arguments,
173 prompt=prompt,
174 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700175 return main.TRUE
176
kelvin-onlab898a6c62015-01-16 14:13:53 -0800177 def show_axrp( self, *options, **def_args ):
178 "Possible Options :[]"
179 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700180 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800181 arguments = arguments + option + ' '
182 prompt = def_args.setdefault( 'prompt', self.prompt )
183 timeout = def_args.setdefault( 'timeout', self.timeout )
184 self.execute(
185 cmd="show axrp " +
186 arguments,
187 prompt=prompt,
188 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700189 return main.TRUE
190
kelvin-onlab898a6c62015-01-16 14:13:53 -0800191 def show_oadp( self, *options, **def_args ):
192 "Possible Options :[]"
193 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700194 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800195 arguments = arguments + option + ' '
196 prompt = def_args.setdefault( 'prompt', self.prompt )
197 timeout = def_args.setdefault( 'timeout', self.timeout )
198 self.execute(
199 cmd="show oadp " +
200 arguments,
201 prompt=prompt,
202 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700203 return main.TRUE
204
kelvin-onlab898a6c62015-01-16 14:13:53 -0800205 def show_gsrp( self, *options, **def_args ):
206 "Possible Options :[]"
207 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700208 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800209 arguments = arguments + option + ' '
210 prompt = def_args.setdefault( 'prompt', self.prompt )
211 timeout = def_args.setdefault( 'timeout', self.timeout )
212 self.execute(
213 cmd="show gsrp " +
214 arguments,
215 prompt=prompt,
216 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700217 return main.TRUE
218
kelvin-onlab898a6c62015-01-16 14:13:53 -0800219 def show_port( self, *options, **def_args ):
220 "Possible Options :[]"
221 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700222 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800223 arguments = arguments + option + ' '
224 prompt = def_args.setdefault( 'prompt', self.prompt )
225 timeout = def_args.setdefault( 'timeout', self.timeout )
226 self.execute(
227 cmd="show port " +
228 arguments,
229 prompt=prompt,
230 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700231 return main.TRUE
232
kelvin-onlab898a6c62015-01-16 14:13:53 -0800233 def show_file( self, *options, **def_args ):
234 "Possible Options :[]"
235 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700236 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800237 arguments = arguments + option + ' '
238 prompt = def_args.setdefault( 'prompt', self.prompt )
239 timeout = def_args.setdefault( 'timeout', self.timeout )
240 self.execute(
241 cmd="show file " +
242 arguments,
243 prompt=prompt,
244 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700245 return main.TRUE
246
kelvin-onlab898a6c62015-01-16 14:13:53 -0800247 def show_power( self, *options, **def_args ):
248 "Possible Options :[]"
249 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700250 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800251 arguments = arguments + option + ' '
252 prompt = def_args.setdefault( 'prompt', self.prompt )
253 timeout = def_args.setdefault( 'timeout', self.timeout )
254 self.execute(
255 cmd="show power " +
256 arguments,
257 prompt=prompt,
258 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700259 return main.TRUE
260
kelvin-onlab898a6c62015-01-16 14:13:53 -0800261 def show_clock( self, *options, **def_args ):
262 "Possible Options :[]"
263 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700264 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800265 arguments = arguments + option + ' '
266 prompt = def_args.setdefault( 'prompt', self.prompt )
267 timeout = def_args.setdefault( 'timeout', self.timeout )
268 self.execute(
269 cmd="show clock " +
270 arguments,
271 prompt=prompt,
272 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700273 return main.TRUE
274
kelvin-onlab898a6c62015-01-16 14:13:53 -0800275 def show_dot1x( self, *options, **def_args ):
276 "Possible Options :[]"
277 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700278 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800279 arguments = arguments + option + ' '
280 prompt = def_args.setdefault( 'prompt', self.prompt )
281 timeout = def_args.setdefault( 'timeout', self.timeout )
282 self.execute(
283 cmd="show dot1x " +
284 arguments,
285 prompt=prompt,
286 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700287 return main.TRUE
288
kelvin-onlab898a6c62015-01-16 14:13:53 -0800289 def show_sflow( self, *options, **def_args ):
290 "Possible Options :[]"
291 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700292 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800293 arguments = arguments + option + ' '
294 prompt = def_args.setdefault( 'prompt', self.prompt )
295 timeout = def_args.setdefault( 'timeout', self.timeout )
296 self.execute(
297 cmd="show sflow " +
298 arguments,
299 prompt=prompt,
300 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700301 return main.TRUE
302
kelvin-onlab898a6c62015-01-16 14:13:53 -0800303 def show_track( self, *options, **def_args ):
304 "Possible Options :[]"
305 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700306 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800307 arguments = arguments + option + ' '
308 prompt = def_args.setdefault( 'prompt', self.prompt )
309 timeout = def_args.setdefault( 'timeout', self.timeout )
310 self.execute(
311 cmd="show track " +
312 arguments,
313 prompt=prompt,
314 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700315 return main.TRUE
316
kelvin-onlab898a6c62015-01-16 14:13:53 -0800317 def show_flash( self, *options, **def_args ):
318 "Possible Options :[]"
319 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700320 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800321 arguments = arguments + option + ' '
322 prompt = def_args.setdefault( 'prompt', self.prompt )
323 timeout = def_args.setdefault( 'timeout', self.timeout )
324 self.execute(
325 cmd="show flash " +
326 arguments,
327 prompt=prompt,
328 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700329 return main.TRUE
330
kelvin-onlab898a6c62015-01-16 14:13:53 -0800331 def show_system( self, *options, **def_args ):
332 "Possible Options :[]"
333 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700334 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800335 arguments = arguments + option + ' '
336 prompt = def_args.setdefault( 'prompt', self.prompt )
337 timeout = def_args.setdefault( 'timeout', self.timeout )
338 self.execute(
339 cmd="show system " +
340 arguments,
341 prompt=prompt,
342 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700343 return main.TRUE
344
kelvin-onlab898a6c62015-01-16 14:13:53 -0800345 def show_whoami( self, *options, **def_args ):
346 "Possible Options :[]"
347 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700348 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800349 arguments = arguments + option + ' '
350 prompt = def_args.setdefault( 'prompt', self.prompt )
351 timeout = def_args.setdefault( 'timeout', self.timeout )
352 self.execute(
353 cmd="show whoami " +
354 arguments,
355 prompt=prompt,
356 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700357 return main.TRUE
358
kelvin-onlab898a6c62015-01-16 14:13:53 -0800359 def show_efmoam( self, *options, **def_args ):
360 "Possible Options :[]"
361 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700362 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800363 arguments = arguments + option + ' '
364 prompt = def_args.setdefault( 'prompt', self.prompt )
365 timeout = def_args.setdefault( 'timeout', self.timeout )
366 self.execute(
367 cmd="show efmoam " +
368 arguments,
369 prompt=prompt,
370 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700371 return main.TRUE
372
kelvin-onlab898a6c62015-01-16 14:13:53 -0800373 def show_memory( self, *options, **def_args ):
374 "Possible Options :[]"
375 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700376 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800377 arguments = arguments + option + ' '
378 prompt = def_args.setdefault( 'prompt', self.prompt )
379 timeout = def_args.setdefault( 'timeout', self.timeout )
380 self.execute(
381 cmd="show memory " +
382 arguments,
383 prompt=prompt,
384 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700385 return main.TRUE
386
kelvin-onlab898a6c62015-01-16 14:13:53 -0800387 def show_tcpdump( self, *options, **def_args ):
388 "Possible Options :[]"
389 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700390 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800391 arguments = arguments + option + ' '
392 prompt = def_args.setdefault( 'prompt', self.prompt )
393 timeout = def_args.setdefault( 'timeout', self.timeout )
394 self.execute(
395 cmd="show tcpdump " +
396 arguments,
397 prompt=prompt,
398 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700399 return main.TRUE
400
kelvin-onlab898a6c62015-01-16 14:13:53 -0800401 def show_history( self, *options, **def_args ):
402 "Possible Options :[]"
403 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700404 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800405 arguments = arguments + option + ' '
406 prompt = def_args.setdefault( 'prompt', self.prompt )
407 timeout = def_args.setdefault( 'timeout', self.timeout )
408 self.execute(
409 cmd="show history " +
410 arguments,
411 prompt=prompt,
412 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700413 return main.TRUE
414
kelvin-onlab898a6c62015-01-16 14:13:53 -0800415 def show_logging( self, *options, **def_args ):
416 "Possible Options :[]"
417 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700418 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800419 arguments = arguments + option + ' '
420 prompt = def_args.setdefault( 'prompt', self.prompt )
421 timeout = def_args.setdefault( 'timeout', self.timeout )
422 self.execute(
423 cmd="show logging " +
424 arguments,
425 prompt=prompt,
426 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700427 return main.TRUE
428
kelvin-onlab898a6c62015-01-16 14:13:53 -0800429 def show_license( self, *options, **def_args ):
430 "Possible Options :[]"
431 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700432 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800433 arguments = arguments + option + ' '
434 prompt = def_args.setdefault( 'prompt', self.prompt )
435 timeout = def_args.setdefault( 'timeout', self.timeout )
436 self.execute(
437 cmd="show license " +
438 arguments,
439 prompt=prompt,
440 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700441 return main.TRUE
442
kelvin-onlab898a6c62015-01-16 14:13:53 -0800443 def show_netstat( self, *options, **def_args ):
444 "Possible Options :[]"
445 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700446 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800447 arguments = arguments + option + ' '
448 prompt = def_args.setdefault( 'prompt', self.prompt )
449 timeout = def_args.setdefault( 'timeout', self.timeout )
450 self.execute(
451 cmd="show netstat " +
452 arguments,
453 prompt=prompt,
454 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700455 return main.TRUE
456
kelvin-onlab898a6c62015-01-16 14:13:53 -0800457 def show_version( self, *options, **def_args ):
458 "Possible Options :[]"
459 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700460 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800461 arguments = arguments + option + ' '
462 prompt = def_args.setdefault( 'prompt', self.prompt )
463 timeout = def_args.setdefault( 'timeout', self.timeout )
464 self.execute(
465 cmd="show version " +
466 arguments,
467 prompt=prompt,
468 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700469 return main.TRUE
470
kelvin-onlab898a6c62015-01-16 14:13:53 -0800471 def show_netconf( self, *options, **def_args ):
472 "Possible Options :[]"
473 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700474 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800475 arguments = arguments + option + ' '
476 prompt = def_args.setdefault( 'prompt', self.prompt )
477 timeout = def_args.setdefault( 'timeout', self.timeout )
478 self.execute(
479 cmd="show netconf " +
480 arguments,
481 prompt=prompt,
482 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700483 return main.TRUE
484
kelvin-onlab898a6c62015-01-16 14:13:53 -0800485 def show_ipdual( self, *options, **def_args ):
486 "Possible Options :[]"
487 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700488 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800489 arguments = arguments + option + ' '
490 prompt = def_args.setdefault( 'prompt', self.prompt )
491 timeout = def_args.setdefault( 'timeout', self.timeout )
492 self.execute(
493 cmd="show ip-dual " +
494 arguments,
495 prompt=prompt,
496 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700497 return main.TRUE
498
kelvin-onlab898a6c62015-01-16 14:13:53 -0800499 def show_sessions( self, *options, **def_args ):
500 "Possible Options :[]"
501 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700502 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800503 arguments = arguments + option + ' '
504 prompt = def_args.setdefault( 'prompt', self.prompt )
505 timeout = def_args.setdefault( 'timeout', self.timeout )
506 self.execute(
507 cmd="show sessions " +
508 arguments,
509 prompt=prompt,
510 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700511 return main.TRUE
512
kelvin-onlab898a6c62015-01-16 14:13:53 -0800513 def show_qosflow( self, *options, **def_args ):
514 "Possible Options :[]"
515 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700516 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800517 arguments = arguments + option + ' '
518 prompt = def_args.setdefault( 'prompt', self.prompt )
519 timeout = def_args.setdefault( 'timeout', self.timeout )
520 self.execute(
521 cmd="show qos-flow " +
522 arguments,
523 prompt=prompt,
524 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700525 return main.TRUE
526
kelvin-onlab898a6c62015-01-16 14:13:53 -0800527 def show_openflow( self, *options, **def_args ):
528 "Possible Options :[]"
529 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700530 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800531 arguments = arguments + option + ' '
532 prompt = def_args.setdefault( 'prompt', self.prompt )
533 timeout = def_args.setdefault( 'timeout', self.timeout )
534 self.execute(
535 cmd="show openflow " +
536 arguments,
537 prompt=prompt,
538 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700539 return main.TRUE
540
kelvin-onlab898a6c62015-01-16 14:13:53 -0800541 def show_dumpfile( self, *options, **def_args ):
542 "Possible Options :[]"
543 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700544 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800545 arguments = arguments + option + ' '
546 prompt = def_args.setdefault( 'prompt', self.prompt )
547 timeout = def_args.setdefault( 'timeout', self.timeout )
548 self.execute(
549 cmd="show dumpfile " +
550 arguments,
551 prompt=prompt,
552 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700553 return main.TRUE
554
kelvin-onlab898a6c62015-01-16 14:13:53 -0800555 def show_ipv6dhcp( self, *options, **def_args ):
556 "Possible Options :[]"
557 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700558 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800559 arguments = arguments + option + ' '
560 prompt = def_args.setdefault( 'prompt', self.prompt )
561 timeout = def_args.setdefault( 'timeout', self.timeout )
562 self.execute(
563 cmd="show ipv6-dhcp " +
564 arguments,
565 prompt=prompt,
566 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700567 return main.TRUE
568
kelvin-onlab898a6c62015-01-16 14:13:53 -0800569 def show_processes( self, *options, **def_args ):
570 "Possible Options :[]"
571 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700572 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800573 arguments = arguments + option + ' '
574 prompt = def_args.setdefault( 'prompt', self.prompt )
575 timeout = def_args.setdefault( 'timeout', self.timeout )
576 self.execute(
577 cmd="show processes " +
578 arguments,
579 prompt=prompt,
580 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700581 return main.TRUE
582
kelvin-onlab898a6c62015-01-16 14:13:53 -0800583 def show_vrrpstatus( self, *options, **def_args ):
584 "Possible Options :[]"
585 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700586 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800587 arguments = arguments + option + ' '
588 prompt = def_args.setdefault( 'prompt', self.prompt )
589 timeout = def_args.setdefault( 'timeout', self.timeout )
590 self.execute(
591 cmd="show vrrpstatus " +
592 arguments,
593 prompt=prompt,
594 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700595 return main.TRUE
596
kelvin-onlab898a6c62015-01-16 14:13:53 -0800597 def show_interfaces( self, *options, **def_args ):
598 "Possible Options :[]"
599 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700600 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800601 arguments = arguments + option + ' '
602 prompt = def_args.setdefault( 'prompt', self.prompt )
603 timeout = def_args.setdefault( 'timeout', self.timeout )
604 self.execute(
605 cmd="show interfaces " +
606 arguments,
607 prompt=prompt,
608 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700609 return main.TRUE
610
kelvin-onlab898a6c62015-01-16 14:13:53 -0800611 def show_environment( self, *options, **def_args ):
612 "Possible Options :[]"
613 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700614 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800615 arguments = arguments + option + ' '
616 prompt = def_args.setdefault( 'prompt', self.prompt )
617 timeout = def_args.setdefault( 'timeout', self.timeout )
618 self.execute(
619 cmd="show environment " +
620 arguments,
621 prompt=prompt,
622 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700623 return main.TRUE
624
kelvin-onlab898a6c62015-01-16 14:13:53 -0800625 def show_autoconfig( self, *options, **def_args ):
626 "Possible Options :[]"
627 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700628 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800629 arguments = arguments + option + ' '
630 prompt = def_args.setdefault( 'prompt', self.prompt )
631 timeout = def_args.setdefault( 'timeout', self.timeout )
632 self.execute(
633 cmd="show auto-config " +
634 arguments,
635 prompt=prompt,
636 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700637 return main.TRUE
638
kelvin-onlab898a6c62015-01-16 14:13:53 -0800639 def show_techsupport( self, *options, **def_args ):
640 "Possible Options :[]"
641 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700642 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800643 arguments = arguments + option + ' '
644 prompt = def_args.setdefault( 'prompt', self.prompt )
645 timeout = def_args.setdefault( 'timeout', self.timeout )
646 self.execute(
647 cmd="show tech-support " +
648 arguments,
649 prompt=prompt,
650 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700651 return main.TRUE
652
kelvin-onlab898a6c62015-01-16 14:13:53 -0800653 def show_mldsnooping( self, *options, **def_args ):
654 "Possible Options :[]"
655 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700656 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800657 arguments = arguments + option + ' '
658 prompt = def_args.setdefault( 'prompt', self.prompt )
659 timeout = def_args.setdefault( 'timeout', self.timeout )
660 self.execute(
661 cmd="show mld-snooping " +
662 arguments,
663 prompt=prompt,
664 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700665 return main.TRUE
666
kelvin-onlab898a6c62015-01-16 14:13:53 -0800667 def show_igmpsnooping( self, *options, **def_args ):
668 "Possible Options :[]"
669 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700670 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800671 arguments = arguments + option + ' '
672 prompt = def_args.setdefault( 'prompt', self.prompt )
673 timeout = def_args.setdefault( 'timeout', self.timeout )
674 self.execute(
675 cmd="show igmp-snooping " +
676 arguments,
677 prompt=prompt,
678 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700679 return main.TRUE
680
kelvin-onlab898a6c62015-01-16 14:13:53 -0800681 def show_channelgroup( self, *options, **def_args ):
682 "Possible Options :[]"
683 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700684 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800685 arguments = arguments + option + ' '
686 prompt = def_args.setdefault( 'prompt', self.prompt )
687 timeout = def_args.setdefault( 'timeout', self.timeout )
688 self.execute(
689 cmd="show channel-group " +
690 arguments,
691 prompt=prompt,
692 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700693 return main.TRUE
694
kelvin-onlab898a6c62015-01-16 14:13:53 -0800695 def show_spanningtree( self, *options, **def_args ):
696 "Possible Options :[]"
697 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700698 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800699 arguments = arguments + option + ' '
700 prompt = def_args.setdefault( 'prompt', self.prompt )
701 timeout = def_args.setdefault( 'timeout', self.timeout )
702 self.execute(
703 cmd="show spanning-tree " +
704 arguments,
705 prompt=prompt,
706 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700707 return main.TRUE
708
kelvin-onlab898a6c62015-01-16 14:13:53 -0800709 def show_loopdetection( self, *options, **def_args ):
710 "Possible Options :[]"
711 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700712 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800713 arguments = arguments + option + ' '
714 prompt = def_args.setdefault( 'prompt', self.prompt )
715 timeout = def_args.setdefault( 'timeout', self.timeout )
716 self.execute(
717 cmd="show loop-detection " +
718 arguments,
719 prompt=prompt,
720 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700721 return main.TRUE
722
kelvin-onlab898a6c62015-01-16 14:13:53 -0800723 def show_acknowledgments( self, *options, **def_args ):
724 "Possible Options :[' interface ']"
725 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700726 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800727 arguments = arguments + option + ' '
728 prompt = def_args.setdefault( 'prompt', self.prompt )
729 timeout = def_args.setdefault( 'timeout', self.timeout )
730 self.execute(
731 cmd="show acknowledgments " +
732 arguments,
733 prompt=prompt,
734 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700735 return main.TRUE
736
kelvin-onlab898a6c62015-01-16 14:13:53 -0800737 def show_macaddresstable( self, *options, **def_args ):
738 "Possible Options :[]"
739 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700740 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800741 arguments = arguments + option + ' '
742 prompt = def_args.setdefault( 'prompt', self.prompt )
743 timeout = def_args.setdefault( 'timeout', self.timeout )
744 self.execute(
745 cmd="show mac-address-table " +
746 arguments,
747 prompt=prompt,
748 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700749 return main.TRUE
750
kelvin-onlab898a6c62015-01-16 14:13:53 -0800751 def show_configlockstatus( self, *options, **def_args ):
752 "Possible Options :[]"
753 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700754 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800755 arguments = arguments + option + ' '
756 prompt = def_args.setdefault( 'prompt', self.prompt )
757 timeout = def_args.setdefault( 'timeout', self.timeout )
758 self.execute(
759 cmd="show config-lock-status " +
760 arguments,
761 prompt=prompt,
762 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700763 return main.TRUE
764
kelvin-onlab898a6c62015-01-16 14:13:53 -0800765 def show_acknowledgments_interface( self, *options, **def_args ):
766 "Possible Options :[]"
767 arguments = ''
adminbae64d82013-08-01 10:50:15 -0700768 for option in options:
kelvin-onlab898a6c62015-01-16 14:13:53 -0800769 arguments = arguments + option + ' '
770 prompt = def_args.setdefault( 'prompt', self.prompt )
771 timeout = def_args.setdefault( 'timeout', self.timeout )
772 self.execute(
773 cmd="show acknowledgments interface " +
774 arguments,
775 prompt=prompt,
776 timeout=timeout )
adminbae64d82013-08-01 10:50:15 -0700777 return main.TRUE