cleaned up core.emane, core.services, core.xml, fixed bug introduced in coreobj.py
This commit is contained in:
parent
eb04e0a79f
commit
12cc40d3d3
11 changed files with 11 additions and 207 deletions
|
@ -602,8 +602,7 @@ class MgenActor(NrlService):
|
|||
comments = ""
|
||||
cmd = "mgenBasicActor.py -n %s -a 0.0.0.0" % node.name
|
||||
|
||||
servicenames = map(lambda x: x.name, node.services)
|
||||
netifs = filter(lambda x: not getattr(x, 'control', False), node.netifs())
|
||||
netifs = [x for x in node.netifs() if not getattr(x, "control", False)]
|
||||
if len(netifs) == 0:
|
||||
return ""
|
||||
|
||||
|
|
|
@ -551,7 +551,6 @@ class Babel(QuaggaService):
|
|||
|
||||
@classmethod
|
||||
def generatequaggaifcconfig(cls, node, ifc):
|
||||
type = "wired"
|
||||
if ifc.net and ifc.net.linktype == LinkTypes.WIRELESS.value:
|
||||
return " babel wireless\n no babel split-horizon\n"
|
||||
else:
|
||||
|
|
|
@ -35,12 +35,6 @@ class OvsService(SdnService):
|
|||
if s.name == "zebra":
|
||||
has_zebra = 1
|
||||
|
||||
# Check whether the node is running an SDN controller
|
||||
has_sdn_ctrlr = 0
|
||||
for s in node.services:
|
||||
if s.name == "ryuService":
|
||||
has_sdn_ctrlr = 1
|
||||
|
||||
cfg = "#!/bin/sh\n"
|
||||
cfg += "# auto-generated by OvsService (OvsService.py)\n"
|
||||
cfg += "/etc/init.d/openvswitch-switch start < /dev/null\n"
|
||||
|
|
|
@ -107,11 +107,6 @@ ${UCARP_EXEC} -B ${UCARP_OPTS}
|
|||
"""
|
||||
Generate a shell script used to boot the Ucarp daemons.
|
||||
"""
|
||||
|
||||
try:
|
||||
ucarp_bin = node.session.cfg['ucarp_bin']
|
||||
except KeyError:
|
||||
ucarp_bin = "/usr/sbin/ucarp"
|
||||
return """\
|
||||
#!/bin/sh
|
||||
# Location of the UCARP config directory
|
||||
|
@ -129,11 +124,6 @@ ${UCARP_CFGDIR}/default.sh
|
|||
"""
|
||||
Generate a shell script used to start the virtual ip
|
||||
"""
|
||||
try:
|
||||
ucarp_bin = node.session.cfg['ucarp_bin']
|
||||
except KeyError:
|
||||
ucarp_bin = "/usr/sbin/ucarp"
|
||||
|
||||
return """\
|
||||
#!/bin/bash
|
||||
|
||||
|
@ -156,10 +146,6 @@ fi
|
|||
"""
|
||||
Generate a shell script used to stop the virtual ip
|
||||
"""
|
||||
try:
|
||||
ucarp_bin = node.session.cfg['ucarp_bin']
|
||||
except KeyError:
|
||||
ucarp_bin = "/usr/sbin/ucarp"
|
||||
return """\
|
||||
#!/bin/bash
|
||||
|
||||
|
|
|
@ -83,10 +83,8 @@ class DefaultRouteService(UtilService):
|
|||
def addrstr(x):
|
||||
if x.find(":") >= 0:
|
||||
net = Ipv6Prefix(x)
|
||||
fam = "inet6 ::"
|
||||
else:
|
||||
net = Ipv4Prefix(x)
|
||||
fam = "inet 0.0.0.0"
|
||||
if net.max_addr() == net.min_addr():
|
||||
return ""
|
||||
else:
|
||||
|
@ -145,11 +143,9 @@ class StaticRouteService(UtilService):
|
|||
def routestr(x):
|
||||
if x.find(":") >= 0:
|
||||
net = Ipv6Prefix(x)
|
||||
fam = "inet6"
|
||||
dst = "3ffe:4::/64"
|
||||
else:
|
||||
net = Ipv4Prefix(x)
|
||||
fam = "inet"
|
||||
dst = "10.9.8.0/24"
|
||||
if net.max_addr() == net.min_addr():
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue