daemon: remove Quagga 'vtysh' service

Since all Quagga daemons are configured from a consolidated
location (the 'zebra' service), there is nothing left to do
for a dedicated service such as 'vtysh'. This patch removes
the service, along with all references to it from the rest
of the source tree (sample *.imn files, examples, etc.)

Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
This commit is contained in:
Gabriel Somlo 2017-01-13 09:33:48 -05:00
parent b4c8be9e23
commit 33906aae9f
15 changed files with 40 additions and 60 deletions

View file

@ -911,12 +911,12 @@ class CoreDocumentParser1(object):
def parse_default_services(self):
# defaults from the CORE GUI
self.default_services = {
'router': ['zebra', 'OSPFv2', 'OSPFv3', 'vtysh', 'IPForward'],
'router': ['zebra', 'OSPFv2', 'OSPFv3', 'IPForward'],
'host': ['DefaultRoute', 'SSH'],
'PC': ['DefaultRoute',],
'mdr': ['zebra', 'OSPFv3MDR', 'vtysh', 'IPForward'],
# 'prouter': ['zebra', 'OSPFv2', 'OSPFv3', 'vtysh', 'IPForward'],
# 'xen': ['zebra', 'OSPFv2', 'OSPFv3', 'vtysh', 'IPForward'],
'mdr': ['zebra', 'OSPFv3MDR', 'IPForward'],
# 'prouter': ['zebra', 'OSPFv2', 'OSPFv3', 'IPForward'],
# 'xen': ['zebra', 'OSPFv2', 'OSPFv3', 'IPForward'],
}
default_services = \
getFirstChildByTagName(self.scenario, 'CORE:defaultservices')

View file

@ -30,7 +30,6 @@ class Zebra(CoreService):
'''
_name = "zebra"
_group = "Quagga"
_depends = ("vtysh", )
_dirs = ("/usr/local/etc/quagga", "/var/run/quagga")
_configs = ("/usr/local/etc/quagga/Quagga.conf",
"quaggaboot.sh","/usr/local/etc/quagga/vtysh.conf")
@ -593,21 +592,3 @@ class Xpimd(QuaggaService):
return ' ip mfea\n ip igmp\n ip pim\n'
addservice(Xpimd)
class Vtysh(CoreService):
''' Simple service to run vtysh -b (boot) after all Quagga daemons have
started.
'''
_name = "vtysh"
_group = "Quagga"
_startindex = 45
_startup = ()
_shutdown = ()
@classmethod
def generateconfig(cls, node, filename, services):
return ""
addservice(Vtysh)

View file

@ -109,7 +109,6 @@ class XenNode(PyCoreNode):
#'sh quaggaboot.sh zebra',
#'sh quaggaboot.sh ospfd',
#'sh quaggaboot.sh ospf6d',
'sh quaggaboot.sh vtysh',
'killall zebra',
'killall ospfd',
'killall ospf6d',

View file

@ -70,7 +70,7 @@ def main():
values[ names.index('propagationmodel') ] = '2ray'
session.emane.setconfig(wlan.objid, EmaneIeee80211abgModel._name, values)
services_str = "zebra|OSPFv3MDR|vtysh|IPForward"
services_str = "zebra|OSPFv3MDR|IPForward"
print "creating %d nodes with addresses from %s" % \
(options.numnodes, prefix)

View file

@ -97,7 +97,7 @@ def main():
parser.add_option("-s", "--services", dest = "services", type = str,
help = "pipe-delimited list of services added to each " \
"node (default = %s)\n(Example: 'zebra|OSPFv2|OSPFv3|" \
"vtysh|IPForward')" % parser.defaults["services"])
"IPForward')" % parser.defaults["services"])
def usage(msg = None, err = 0):
sys.stdout.write("\n")

View file

@ -66,7 +66,7 @@ def wifisession(opt):
wifi.phy.Set("RxGain", ns.core.DoubleValue(18.0))
prefix = ipaddr.IPv4Prefix("10.0.0.0/16")
services_str = "zebra|OSPFv3MDR|vtysh|IPForward"
services_str = "zebra|OSPFv3MDR|IPForward"
nodes = []
for i in xrange(1, opt.numnodes + 1):
node = session.addnode(name = "n%d" % i)