admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 1 | class Pronto: |
| 2 | def __init__( self ): |
| 3 | self.prompt = '(.*)' |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 4 | self.timeout = 60 |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 5 | |
| 6 | def status(self, *options, **def_args ): |
| 7 | '''Possible Options :['Pronto-CLI']''' |
| 8 | arguments= '' |
| 9 | for option in options: |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 10 | arguments = arguments + option +' ' |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 11 | prompt = def_args.setdefault('prompt',self.prompt) |
| 12 | timeout = def_args.setdefault('timeout',self.timeout) |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 13 | self.execute( cmd= "status "+ arguments, prompt = prompt, timeout = timeout ) |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 14 | return main.TRUE |
| 15 | |
| 16 | def port_show_*(self, *options, **def_args ): |
| 17 | '''Possible Options :['Pronto-CLI']''' |
| 18 | arguments= '' |
| 19 | for option in options: |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 20 | arguments = arguments + option +' ' |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 21 | prompt = def_args.setdefault('prompt',self.prompt) |
| 22 | timeout = def_args.setdefault('timeout',self.timeout) |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 23 | self.execute( cmd= "port show * "+ arguments, prompt = prompt, timeout = timeout ) |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 24 | return main.TRUE |
| 25 | |
| 26 | def status_ProntoCLI(self, *options, **def_args ): |
| 27 | '''Possible Options :[]''' |
| 28 | arguments= '' |
| 29 | for option in options: |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 30 | arguments = arguments + option +' ' |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 31 | prompt = def_args.setdefault('prompt',self.prompt) |
| 32 | timeout = def_args.setdefault('timeout',self.timeout) |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 33 | self.execute( cmd= "status Pronto-CLI "+ arguments, prompt = prompt, timeout = timeout ) |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 34 | return main.TRUE |
| 35 | |
| 36 | def port_show_*_ProntoCLI(self, *options, **def_args ): |
| 37 | '''Possible Options :[]''' |
| 38 | arguments= '' |
| 39 | for option in options: |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 40 | arguments = arguments + option +' ' |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 41 | prompt = def_args.setdefault('prompt',self.prompt) |
| 42 | timeout = def_args.setdefault('timeout',self.timeout) |
Jon Hall | 4ba53f0 | 2015-07-29 13:07:41 -0700 | [diff] [blame] | 43 | self.execute( cmd= "port show * Pronto-CLI "+ arguments, prompt = prompt, timeout = timeout ) |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 44 | return main.TRUE |
| 45 | |