blob: 665be7f029ad3dd27404e5ab4f3dba7f1765e4aa [file] [log] [blame]
andrew@onlab.us1bc346b2015-05-21 17:21:16 -04001
2"""
3Startup related methods for ONOS
4
5Guidelines:
6 * Group sequential functionalities together
7 * Methods should not prohibit cross platform execution
8 * Return main.TRUE on success or comprehensive error message
9 on failure (TBD)
10"""
11
12def __init__( self ):
13 self.ip = '127.0.0.1'
14
15def gitPullAndMci( branchName, commitLog=False ):
16 """
17 Pull from branch repository specified and compile changes
18 If commitLog is True, report commit information
19
20 Any errors / warnings will be handled by respective
21 driver function calls
22 """
23 co = main.ONOSbench.gitCheckout( branchName )
24 gp = main.ONOSbench.gitPull()
25 ci = main.ONOSbench.cleanInstall()
26
27 if co and gp and ci == main.TRUE:
28 if commitLog:
29 main.log.report( 'Commit information - ' )
30 main.ONOSbench.getVersion(report=True)
31
32 return main.TRUE
33
34 else:
35 # TODO: Comprehensive error message
36 return 'git pull and mci failed'
37
38def initOnosStartupSequence( cellName, appsStr, benchIp, onosIps ):
39 """
40 Startup sequence includes the following:
41 *
42 """
43 main.log.info( 'Initiating ONOS startup sequence' )
44
45def isOnosNormal( onosIps ):
46 """
47 Quick and comprehensive check for 'normality'
48
49 Definition of function TBD
50 """
51 main.log.info( 'isOnosNormal' )