X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHoneycombSetup.py;fp=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHoneycombSetup.py;h=fba2bd42257d0f3cffe6b0430d32aab860da64f2;hp=d10a5ccb4e0510aeb439ac05fbb0e424eb1c3783;hb=5a02dd13563a5c67e336f04eb526cbea206da29b;hpb=bdfca054d8425a57496cca8308da36c118b5340f diff --git a/resources/libraries/python/honeycomb/HoneycombSetup.py b/resources/libraries/python/honeycomb/HoneycombSetup.py index d10a5ccb4e..fba2bd4225 100644 --- a/resources/libraries/python/honeycomb/HoneycombSetup.py +++ b/resources/libraries/python/honeycomb/HoneycombSetup.py @@ -293,7 +293,8 @@ class HoneycombSetup(object): "which java", "java -version", "dpkg --list | grep openjdk", - "ls -la /opt/honeycomb") + "ls -la /opt/honeycomb", + "cat /opt/honeycomb/modules/*module-config") for node in nodes: if node['type'] == NodeType.DUT: @@ -365,27 +366,32 @@ class HoneycombSetup(object): """ disabled_features = { - "NSH": "io.fd.hc2vpp.vppnsh.impl.VppNshModule" + "NSH": ["io.fd.hc2vpp.vppnsh.impl.VppNshModule"], + "BGP": ["io.fd.hc2vpp.bgp.inet.BgpInetModule", + "io.fd.honeycomb.infra.bgp.BgpModule", + "io.fd.honeycomb.infra.bgp.BgpReadersModule", + "io.fd.honeycomb.infra.bgp.BgpWritersModule"] } ssh = SSH() ssh.connect(node) if feature in disabled_features.keys(): - # uncomment by replacing the entire line - find = replace = "{0}".format(disabled_features[feature]) - if disable: - replace = "// {0}".format(find) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/modules/*module-config"\ - .format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) + # for every module, uncomment by replacing the entire line + for item in disabled_features[feature]: + find = replace = "{0}".format(item) + if disable: + replace = "// {0}".format(find) + + argument = '"/{0}/c\\ {1}"'.format(find, replace) + path = "{0}/modules/*module-config"\ + .format(Const.REMOTE_HC_DIR) + command = "sed -i {0} {1}".format(argument, path) + + (ret_code, _, stderr) = ssh.exec_command_sudo(command) + if ret_code != 0: + raise HoneycombError("Failed to modify configuration on " + "node {0}, {1}".format(node, stderr)) else: raise HoneycombError( "Unrecognized feature {0}.".format(feature))