Modify hard-code when set a network config
Modify hard-code to global variable when set a network configuration.
Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: Ib7957b1156836b0e29585982d06f5b783bee4083
diff --git a/ipmi/test_ipmi_network_configuration.robot b/ipmi/test_ipmi_network_configuration.robot
index 52d6007..b9b456b 100644
--- a/ipmi/test_ipmi_network_configuration.robot
+++ b/ipmi/test_ipmi_network_configuration.robot
@@ -38,13 +38,13 @@
Redfish Power On
- Set IPMI Inband Network Configuration 10.10.10.10 255.255.255.0 10.10.10.10
+ Set IPMI Inband Network Configuration ${STATIC_IP} ${NETMASK} ${GATEWAY}
Sleep 10
${lan_print_output}= Get LAN Print Dict ${CHANNEL_NUMBER} ipmi_cmd_type=inband
- Valid Value lan_print_output['IP Address'] ["10.10.10.10"]
- Valid Value lan_print_output['Subnet Mask'] ["255.255.255.0"]
- Valid Value lan_print_output['Default Gateway IP'] ["10.10.10.10"]
+ Valid Value lan_print_output['IP Address'] ["${STATIC_IP}"]
+ Valid Value lan_print_output['Subnet Mask'] ["${NETMASK}"]
+ Valid Value lan_print_output['Default Gateway IP'] ["${GATEWAY}"]
Disable VLAN Via IPMI When Multiple VLAN Exist On BMC
diff --git a/lib/resource.robot b/lib/resource.robot
index 76d1e7c..1018e60 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -90,6 +90,10 @@
${FIN_PACKETS} FIN
${SYN_ACK_RESET} SAR
${ALL_FLAGS} ALL
+# Used to set BMC static IPv4 configuration.
+${STATIC_IP} 10.10.10.10
+${NETMASK} 255.255.255.0
+${GATEWAY} 10.10.10.10
# BMC debug tarball parameter
${DEBUG_TARBALL_PATH} ${EMPTY}