added reconfigure event type, for re-generating service config files
added new Event Message handling for starting mobility model or reconfiguring a service during runtime (Boeing r1806)
This commit is contained in:
parent
c1c71bb33a
commit
a9ea208a08
4 changed files with 42 additions and 6 deletions
|
@ -626,6 +626,18 @@ class CoreServices(ConfigurableManager):
|
|||
node.warn("error starting command %s" % cmd)
|
||||
if eventtype == coreapi.CORE_EVENT_PAUSE:
|
||||
self.validatenodeservice(node, s, services)
|
||||
if eventtype == coreapi.CORE_EVENT_RECONFIGURE:
|
||||
if s._custom:
|
||||
cfgfiles = s._configs
|
||||
else:
|
||||
cfgfiles = s.getconfigfilenames(node.objid, services)
|
||||
for filename in cfgfiles:
|
||||
if filename[:7] == "file:///":
|
||||
raise NotImplementedError # TODO
|
||||
cfg = self.getservicefiledata(s, filename)
|
||||
if cfg is None:
|
||||
cfg = s.generateconfig(node, filename, services)
|
||||
node.nodefile(filename, cfg)
|
||||
|
||||
|
||||
class CoreService(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue