Skip to content

Commit

Permalink
Multiple DHCP Test case
Browse files Browse the repository at this point in the history
Changes:
    Added new test case

Tested:
    Tested on BMC Environmet

Change-Id: Ib8586dbce2b0e8f71822a54d85948255f938784e
Signed-off-by: Sweta Potthuri <[email protected]>
  • Loading branch information
swe12345 committed Oct 12, 2023
1 parent 7c32f30 commit 51ce121
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions redfish/managers/test_multiple_interfaces_dhcp.robot
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ${ethernet_interface} eth1
... UseNTPServers=${False}
... UseDNSServers=${False}

Force Tags Multiple_Interfaces_DHCP

*** Test Cases ***

Disable DHCP On Eth1 And Verify System Is Accessible By Eth0
Expand Down Expand Up @@ -68,8 +70,37 @@ Set Network Property via Redfish And Verify
${enable_multiple_properties}
${disable_multiple_properties}

Enable DHCP On Eth1 And Check No Impact On Eth0
[Documentation] Enable DHCP On Eth1 And Check No Impact On Eth0.
[Tags] Enable_DHCP_On_Eth1_And_Check_No_Impact_On_Eth0
[Setup] Set DHCPEnabled To Enable Or Disable False eth1

# Getting the eth0 details before enabling DHCP.
${ip_data_before}= Get BMC IP Info

# Enable DHCP.
Set DHCPEnabled To Enable Or Disable True eth1

# Check the value of DHCPEnabled on eth0 is not impacted.
${DHCPEnabled}= Get IPv4 DHCP Enabled Status
Should Be Equal ${DHCPEnabled} ${False}

# Getting eth0 details after enabling DHCP.
${ip_data_after}= Get BMC IP Info

# Before and after IP details must match.
Should Be Equal ${ip_data_before} ${ip_data_after}

*** Keywords ***

Get IPv4 DHCP Enabled Status
[Documentation] Return IPv4 DHCP enabled status from redfish URI.
${active_channel_config}= Get Active Channel Config
${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
${resp}= Redfish.Get Attribute ${REDFISH_NW_ETH_IFACE}${ethernet_interface} DHCPv4
Return From Keyword ${resp['DHCPEnabled']}

Set DHCPEnabled To Enable Or Disable
[Documentation] Enable or Disable DHCP on the interface.
[Arguments] ${dhcp_enabled}=${False} ${interface}=${ethernet_interface}
Expand Down

0 comments on commit 51ce121

Please sign in to comment.