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:
parent
b868454b5e
commit
0aca9d7809
11 changed files with 123 additions and 147 deletions
|
@ -15,7 +15,7 @@ class SdnService(CoreService):
|
|||
startindex = 50
|
||||
|
||||
@classmethod
|
||||
def generateconfig(cls, node, filename, services):
|
||||
def generateconfig(cls, node, filename):
|
||||
return ""
|
||||
|
||||
|
||||
|
@ -31,16 +31,16 @@ class OvsService(SdnService):
|
|||
shutdown = ('killall ovs-vswitchd', 'killall ovsdb-server')
|
||||
|
||||
@classmethod
|
||||
def generateconfig(cls, node, filename, services):
|
||||
def generateconfig(cls, node, filename):
|
||||
# Check whether the node is running zebra
|
||||
has_zebra = 0
|
||||
for s in services:
|
||||
for s in node.services:
|
||||
if s.name == "zebra":
|
||||
has_zebra = 1
|
||||
|
||||
# Check whether the node is running an SDN controller
|
||||
has_sdn_ctrlr = 0
|
||||
for s in services:
|
||||
for s in node.services:
|
||||
if s.name == "ryuService":
|
||||
has_sdn_ctrlr = 1
|
||||
|
||||
|
@ -106,7 +106,7 @@ class RyuService(SdnService):
|
|||
shutdown = ('killall ryu-manager',)
|
||||
|
||||
@classmethod
|
||||
def generateconfig(cls, node, filename, services):
|
||||
def generateconfig(cls, node, filename):
|
||||
"""
|
||||
Return a string that will be written to filename, or sent to the
|
||||
GUI for user customization.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue