admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 2 | """ |
| 3 | Created on 22-Nov-2012 |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 4 | |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 5 | author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com ) |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 6 | |
| 7 | |
| 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 |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 11 | ( at your option ) any later version. |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 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 |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 19 | along with TestON. If not, see <http://www.gnu.org/licenses/>. |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 20 | |
| 21 | |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 22 | """ |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 23 | from drivers.component import Component |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 24 | |
| 25 | |
| 26 | class API( Component ): |
| 27 | |
| 28 | """ |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 29 | This will define common functions for CLI included. |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 30 | """ |
| 31 | def __init__( self ): |
| 32 | super( Component, self ).__init__() |
| 33 | |
| 34 | def connect( self ): |
| 35 | """ |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 36 | Connection will establish to the remote host using ssh. |
| 37 | It will take user_name ,ip_address and password as arguments<br> |
kelvin | 8ec7144 | 2015-01-15 16:57:00 -0800 | [diff] [blame] | 38 | and will return the handle. |
| 39 | """ |
| 40 | super( API, self ).connect() |
| 41 | |
| 42 | return main.TRUE |
| 43 | |