blob: fae42ac71d75215a711855ddf376f121607840f4 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001#!/usr/bin/env python
kelvin-onlabbbe46482015-01-16 10:44:28 -08002"""
3Created on 26-Oct-2012
Jeremy Songsterae01bba2016-07-11 15:39:17 -07004Modified 2015 by ON.Lab
5
6Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
7the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
8or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
adminbae64d82013-08-01 10:50:15 -07009
kelvin-onlabbbe46482015-01-16 10:44:28 -080010author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
adminbae64d82013-08-01 10:50:15 -070011
12 TestON is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 2 of the License, or
kelvin-onlabbbe46482015-01-16 10:44:28 -080015 ( at your option ) any later version.
adminbae64d82013-08-01 10:50:15 -070016
17 TestON is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
kelvin-onlabbbe46482015-01-16 10:44:28 -080023 along with TestON. If not, see <http://www.gnu.org/licenses/>.
adminbae64d82013-08-01 10:50:15 -070024
25
kelvin-onlabbbe46482015-01-16 10:44:28 -080026"""
adminbae64d82013-08-01 10:50:15 -070027from drivers.common.clidriver import CLI
28
kelvin-onlabbbe46482015-01-16 10:44:28 -080029
30class RemoteSysDriver( CLI ):
adminbae64d82013-08-01 10:50:15 -070031 # The common functions for emulator included in emulatordriver
kelvin-onlabbbe46482015-01-16 10:44:28 -080032
33 def __init__( self ):
Devin Limdc78e202017-06-09 18:30:07 -070034 super( RemoteSysDriver, self ).__init__()
kelvin-onlabbbe46482015-01-16 10:44:28 -080035
36 def connect( self, **connectargs ):
adminbae64d82013-08-01 10:50:15 -070037 for key in connectargs:
kelvin-onlabbbe46482015-01-16 10:44:28 -080038 vars( self )[ key ] = connectargs[ key ]
adminbae64d82013-08-01 10:50:15 -070039
kelvin-onlabbbe46482015-01-16 10:44:28 -080040 self.name = self.options[ 'name' ]
41
42 self.handle = super(
43 RemoteSysDriver,
44 self ).connect(
45 user_name=self.user_name,
46 ip_address=self.ip_address,
47 port=self.port,
48 pwd=self.pwd )
49 """
adminbae64d82013-08-01 10:50:15 -070050 if self.handle:
Devin Limdc78e202017-06-09 18:30:07 -070051 self.execute( cmd= "\n",prompt= self.prompt,timeout= 10 )
kelvin-onlabbbe46482015-01-16 10:44:28 -080052 self.execute( cmd= "ssh -l paxterra 10.128.4.1",prompt= "paxterra@10.128.4.1's password:",timeout= 10 )
53 self.execute( cmd= "\n",prompt= "paxterra@10.128.4.1's password:",timeout= 10 )
Devin Limdc78e202017-06-09 18:30:07 -070054 self.execute( cmd="0nLab_gu3st",prompt=self.prompt,timeout=10 )
55 self.execute( cmd="cd TestON/bin/",prompt=self.prompt,timeout=10 )
56 self.execute( cmd="./cli.py run Assert example 1",prompt=self.prompt,timeout=10 )
57 self.execute( cmd= "\n",prompt= self.prompt,timeout= 10 )
kelvin-onlabbbe46482015-01-16 10:44:28 -080058 #self.execute( cmd="help",prompt=">",timeout=10 )
adminbae64d82013-08-01 10:50:15 -070059
kelvin-onlabbbe46482015-01-16 10:44:28 -080060 #self.execute( cmd="~.",prompt= ".*",timeout= 10 )
61 return main.TRUE
62 """