aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/honeycomb/HoneycombSetup.py
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-09-29 15:31:06 +0200
committerselias <samelias@cisco.com>2017-10-11 15:48:59 +0200
commit5a02dd13563a5c67e336f04eb526cbea206da29b (patch)
treecd4806d4a3d1ea1502aee26a1d743c100262063a /resources/libraries/python/honeycomb/HoneycombSetup.py
parentbdfca054d8425a57496cca8308da36c118b5340f (diff)
CSIT-811 HC Test: BGP tests - IPv4 CRUD
Tests configure BGP neighbor peers and simple routes for these peers. Change-Id: I5102986d710551a451e838d934cc9650bcd38a60 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/honeycomb/HoneycombSetup.py')
-rw-r--r--resources/libraries/python/honeycomb/HoneycombSetup.py38
1 files changed, 22 insertions, 16 deletions
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))