Added fix for vmi run on eth1 interface
-Defined ethernet_interface variable in library to pick user passed interface
Change-Id: I9162269d187d9a5718df28e9b69fba093e72cc57
Signed-off-by: shrsuman123 <shrsuman@in.ibm.com>
diff --git a/lib/external_intf/vmi_utils.robot b/lib/external_intf/vmi_utils.robot
index fddafd7..1ff585e 100644
--- a/lib/external_intf/vmi_utils.robot
+++ b/lib/external_intf/vmi_utils.robot
@@ -18,13 +18,14 @@
&{DISABLE_DHCP} DHCPv4=&{DHCP_DISABLED}
${wait_time} 10s
+${ethernet_interface} eth0
*** Keywords ***
Set Static IPv4 Address To VMI And Verify
[Documentation] Set static IPv4 address to VMI.
[Arguments] ${ip} ${gateway} ${netmask} ${valid_status_code}=${HTTP_ACCEPTED}
- ... ${interface}=eth0
+ ... ${interface}=${ethernet_interface}
# Description of argument(s):
# ip VMI IPv4 address.
@@ -49,7 +50,7 @@
Verify VMI Network Interface Details
[Documentation] Verify VMI network interface details.
[Arguments] ${ip} ${origin} ${gateway} ${netmask}
- ... ${interface}=eth0 ${valid_status_code}=${HTTP_OK}
+ ... ${interface}=${ethernet_interface} ${valid_status_code}=${HTTP_OK}
# Description of argument(s):
# ip VMI IPv4 address.
@@ -68,7 +69,7 @@
Delete VMI IPv4 Address
[Documentation] Delete VMI IPv4 address.
[Arguments] ${delete_param}=IPv4StaticAddresses ${valid_status_code}=${HTTP_ACCEPTED}
- ... ${interface}=eth0
+ ... ${interface}=${ethernet_interface}
# Description of argument(s):
# delete_param Parameter to be deleted eg. IPv4StaticAddresses or IPv4Addresses.
@@ -91,7 +92,7 @@
Set VMI IPv4 Origin
[Documentation] Set VMI IPv4 origin.
[Arguments] ${dhcp_enabled}=${False} ${valid_status_code}=${HTTP_ACCEPTED}
- ... ${interface}=eth0
+ ... ${interface}=${ethernet_interface}
# Description of argument(s):
# dhcp_enabled True if user wants to enable DHCP. Default is Static, hence value is set to False.
@@ -111,7 +112,7 @@
Get VMI Network Interface Details
[Documentation] Get VMI network interface details.
- [Arguments] ${interface}=eth0 ${valid_status_code}=${HTTP_OK}
+ [Arguments] ${interface}=${ethernet_interface} ${valid_status_code}=${HTTP_OK}
# Description of argument(s):
# interface VMI interface (eg. eth0 or eth1).