(commit by Kelly Bunn)

session.py:  Created method (sendnodeemuid) to send node status response
             message, so all nodes can call it. Added per session updown
             script option.
service.py:  Added test for _starttime before calling float() in
             bootnodeservices().
             Changed servicesfromopaque code to collect unknown
             services and return with valid services.
             Changed handleevent to send a message with posible failed
             and unknown services.
coreobj.py:  Added code to put nodes actual configured services in
             tonodemsg.
core-daemon: Added call to self.session.sendnodeemuid if in running
             state in handlenodemsg

(Boeing r1824,1825)
This commit is contained in:
ahrenholz 2014-03-05 16:28:32 +00:00
parent b3454da6df
commit f717fcc0dd
4 changed files with 160 additions and 77 deletions

View file

@ -432,7 +432,8 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
services_str = msg.gettlv(coreapi.CORE_TLV_NODE_SERVICES)
self.session.services.addservicestonode(n, model, services_str,
self.verbose)
# boot nodes if they are added after runtime (like session.bootnodes())
# boot nodes if they are added after runtime (like
# session.bootnodes())
if self.session.getstate() == coreapi.CORE_EVENT_RUNTIME_STATE:
if isinstance(n, pycore.nodes.PyCoreNode) and \
not isinstance(n, pycore.nodes.RJ45Node):
@ -441,8 +442,11 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
n.boot()
# self.session.updatectrlifhosts()
# n.validate()
if msg.flags & coreapi.CORE_API_STR_FLAG:
self.nodestatusreq[nodenum] = True
self.session.sendnodeemuid(self, nodenum)
if msg.flags & coreapi.CORE_API_STR_FLAG:
elif msg.flags & coreapi.CORE_API_STR_FLAG:
self.nodestatusreq[nodenum] = True
elif msg.flags & coreapi.CORE_API_DEL_FLAG: