changes to remove the need to pass services separately, when the node has access to them directly, also made a couple CoreServices methods more consistent to have the node as first param and service second

This commit is contained in:
Blake J. Harnden 2018-06-21 14:56:30 -07:00
parent b868454b5e
commit 0aca9d7809
11 changed files with 123 additions and 147 deletions

View file

@ -23,7 +23,7 @@ class XorpRtrmgr(CoreService):
validate = ("pidof xorp_rtrmgr",)
@classmethod
def generateconfig(cls, node, filename, services):
def generateconfig(cls, node, filename):
"""
Returns config.boot configuration file text. Other services that
depend on this will have generatexorpconfig() hooks that are
@ -39,7 +39,7 @@ class XorpRtrmgr(CoreService):
cfg += " }\n"
cfg += "}\n\n"
for s in services:
for s in node.services:
try:
s.depends.index(cls.name)
cfg += s.generatexorpconfig(node)
@ -154,7 +154,7 @@ class XorpService(CoreService):
return "0.0.0.0"
@classmethod
def generateconfig(cls, node, filename, services):
def generateconfig(cls, node, filename):
return ""
@classmethod