Automation fix for Security menu
Changes:
- Modified "Establish TCP Connections And Get Connection Failures" keyword
- Added variable cmd_prefix in lib/protocol_setting_utils.robot
Tested:
- Ran successfully test_bmc_network_security.robot
Change-Id: I9a0d30c24d17c8f7d491bebd7c4376ae95d25209
Signed-off-by: Megha G N <Megha.G.N@ibm.com>
diff --git a/lib/protocol_setting_utils.robot b/lib/protocol_setting_utils.robot
index 3242533..cb56c3d 100644
--- a/lib/protocol_setting_utils.robot
+++ b/lib/protocol_setting_utils.robot
@@ -6,6 +6,11 @@
Resource ../lib/utils.robot
+*** Variables ***
+
+${cmd_prefix} ipmitool -I lanplus -C 17 -p 623 -U ${IPMI_USERNAME} -P ${IPMI_PASSWORD}
+
+
*** Keywords ***
Enable SSH Protocol
diff --git a/lib/resource.robot b/lib/resource.robot
index 03e2e66..db0ccab 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -101,7 +101,7 @@
${ICMP_ECHO_REQUEST} 8
${CHANNEL_NUMBER} 1
${TCP_PACKETS} tcp
-${TCP_CONNECT} tcp-connect
+${TCP_CONNECTION} tcp-connect
${ICMP_NETMASK_REQUEST} 17
${REDFISH_INTERFACE} 443
${SYN_PACKETS} SYN
diff --git a/security/test_bmc_network_security.robot b/security/test_bmc_network_security.robot
index 5e3bbdb..ef4c07a 100644
--- a/security/test_bmc_network_security.robot
+++ b/security/test_bmc_network_security.robot
@@ -230,7 +230,7 @@
... ${http_port}=${80}
# Description of argument(s):
- # host The host name or IP address of the target system.
+ # target_host The host name or IP address of the target system.
# packet_type The type of packets to be sent ("tcp", "udp", "icmp").
# http_port Network port.
# num Number of connections to be sent.
@@ -239,6 +239,6 @@
# and rate at which connectionss to be sent, should be given in command line.
# By default it sends 4 TCP connections at 1 connection/second.
- ${cmd_buf}= Set Variable --delay ${delay} ${host} -c ${num} --${packet_type} -p ${port}
+ ${cmd_buf}= Set Variable --delay ${delay} ${target_host} -c ${num} --${packet_type} -p ${http_port}
${nping_result}= Nping ${cmd_buf}
[Return] ${nping_result['percent_failed']}