mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-15 09:21:06 +02:00
Add check for node status to onos.py startup
Change-Id: I8e6b103ef46a5bc5877507a7adef3eb6117adf64
This commit is contained in:
parent
9b238aef36
commit
a43d0334aa
@ -62,6 +62,7 @@ from functools import partial
|
||||
KarafPort = 8101 # ssh port indicating karaf is running
|
||||
GUIPort = 8181 # GUI/REST port
|
||||
OpenFlowPort = 6653 # OpenFlow port
|
||||
CopycatPort = 9876 # Copycat port
|
||||
|
||||
def defaultUser():
|
||||
"Return a reasonable default user"
|
||||
@ -338,6 +339,17 @@ class ONOSNode( Controller ):
|
||||
info( '.' )
|
||||
self.sanityCheck()
|
||||
time.sleep( 1 )
|
||||
info( ' node-status' )
|
||||
while True:
|
||||
result = quietRun( '%s -h %s "nodes"' %
|
||||
( self.client, self.IP() ), shell=True )
|
||||
nodeStr = 'id=%s, address=%s:%s, state=READY, updated' %\
|
||||
( self.IP(), self.IP(), CopycatPort )
|
||||
if nodeStr in result:
|
||||
break
|
||||
info( '.' )
|
||||
self.sanityCheck()
|
||||
time.sleep( 1 )
|
||||
info( ')\n' )
|
||||
|
||||
def updateEnv( self, envDict ):
|
||||
|
Loading…
x
Reference in New Issue
Block a user