andrew@onlab.us | 1bc346b | 2015-05-21 17:21:16 -0400 | [diff] [blame^] | 1 | |
| 2 | """ |
| 3 | Startup related methods for ONOS |
| 4 | |
| 5 | Guidelines: |
| 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 | |
| 12 | def __init__( self ): |
| 13 | self.ip = '127.0.0.1' |
| 14 | |
| 15 | def 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 | |
| 38 | def initOnosStartupSequence( cellName, appsStr, benchIp, onosIps ): |
| 39 | """ |
| 40 | Startup sequence includes the following: |
| 41 | * |
| 42 | """ |
| 43 | main.log.info( 'Initiating ONOS startup sequence' ) |
| 44 | |
| 45 | def isOnosNormal( onosIps ): |
| 46 | """ |
| 47 | Quick and comprehensive check for 'normality' |
| 48 | |
| 49 | Definition of function TBD |
| 50 | """ |
| 51 | main.log.info( 'isOnosNormal' ) |