GUI: Verify coexitence of Static IPv6 and Linklocal
Changes:
Added test case for coexistence of static and linklocal
Tested:
Ran and tested on BMC Environment.
Change-Id: I2ca5de9b64528a1d678f970a26868c2351cfa3b0
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/gui/gui_test/settings_menu/test_network_sub_menu.robot b/gui/gui_test/settings_menu/test_network_sub_menu.robot
index ccdb82c..d12ac22 100644
--- a/gui/gui_test/settings_menu/test_network_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_network_sub_menu.robot
@@ -4,6 +4,7 @@
Resource ../../lib/gui_resource.robot
Resource ../../../lib/bmc_network_utils.robot
+Resource ../../../lib/bmc_ipv6_utils.robot
Suite Setup Suite Setup Execution
Suite Teardown Close Browser
@@ -46,6 +47,7 @@
... //*[@title="Delete IPv4 address"]
${xpath_delete_button} //*[text()="Delete"]
${xpath_eth1_interface} //*[text()="eth1"]
+${xpath_linklocalv6} //*[text()="LinkLocal"]
${dns_server} 10.10.10.10
${test_ipv4_addr} 10.7.7.7
@@ -234,14 +236,14 @@
[Documentation] Login to GUI Network page, configure multiple static IPv6 address and verify.
[Tags] Configure_And_Verify_Multiple_Static_IPv6_Address
- Add Static IPv6 Address And Verify ${test_ipv6_addr} ${test_prefix_length} Success
- Add Static IPv6 Address And Verify ${test_ipv6_addr_1} ${test_prefix_length} Success
+ Add Static IPv6 Address And Verify Via GUI ${test_ipv6_addr} ${test_prefix_length} Success
+ Add Static IPv6 Address And Verify Via GUI ${test_ipv6_addr_1} ${test_prefix_length} Success
Configure And Verify Static IPv6 Address
[Documentation] Login to GUI Network page, configure static IPv6 address and verify.
[Tags] Configure_And_Verify_Static_IPv6_Address
- [Template] Add Static IPv6 Address And Verify
+ [Template] Add Static IPv6 Address And Verify Via GUI
# ipv6 prefix_length status
${test_ipv6_addr} ${test_prefix_length} Success
@@ -259,6 +261,18 @@
${test_ipv6_addr} Success
+Verify Coexistence of Staticv6 and Linklocal
+ [Documentation] Verify coexistence of staticv6 and linklocal.
+ [Tags] Verify_Coexistence_of_Staticv6_and_Linklocal
+
+ Add Static IPv6 Address And Verify Via GUI ${test_ipv6_addr} ${test_prefix_length} Success
+ @{ipv6_address_origin_list} ${ipv6_linklocal_ipv6_addr}=
+ ... Get Address Origin List And Address For Type LinkLocal
+ Page Should Contain Element ${xpath_linklocalv6}
+ Page Should Contain ${ipv6_linklocal_ipv6_addr}
+ Page Should Contain ${test_ipv6_addr}
+
+
Modify DHCP Properties By Toggling And Verify
[Documentation] Modify DHCP properties by toggling and verify.
[Tags] Modify_DHCP_Properties_By_Toggling_And_Verify
@@ -396,7 +410,7 @@
END
-Add Static IPv6 Address And Verify
+Add Static IPv6 Address And Verify Via GUI
[Documentation] Add static IPv6 address and prefix length and verify.
[Arguments] ${ipv6_address} ${prefix_length} ${expected_status}=error
diff --git a/lib/bmc_ipv6_utils.robot b/lib/bmc_ipv6_utils.robot
index 8e27824..5854029 100644
--- a/lib/bmc_ipv6_utils.robot
+++ b/lib/bmc_ipv6_utils.robot
@@ -87,3 +87,29 @@
... /sbin/ip -6 route
RETURN ${cmd_output}
+
+
+Get Address Origin List And Address For Type
+ [Documentation] Get address origin list and address for type.
+ [Arguments] ${ipv6_address_type}
+
+ # Description of the argument(s):
+ # ipv6_address_type Type of IPv6 address to be checked.
+
+ ${active_channel_config}= Get Active Channel Config
+ ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
+ ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']}
+ @{ipv6_addresses}= Get From Dictionary ${resp.dict} IPv6Addresses
+
+ ${ipv6_addressorigin_list}= Create List
+ ${ipv6_slaac_addr}= Set Variable ${None}
+ FOR ${ipv6_address} IN @{ipv6_addresses}
+ ${ipv6_addressorigin}= Get From Dictionary ${ipv6_address} AddressOrigin
+ Append To List ${ipv6_addressorigin_list} ${ipv6_addressorigin}
+ IF '${ipv6_addressorigin}' == '${ipv6_address_type}'
+ Set Test Variable ${ipv6_type_addr} ${ipv6_address['Address']}
+ END
+ END
+ Should Contain ${ipv6_addressorigin_list} ${ipv6_address_type}
+ Should Not Be Empty ${ipv6_type_addr} msg=${ipv6_address_type} address is not present
+ RETURN @{ipv6_addressorigin_list} ${ipv6_type_addr}
diff --git a/redfish/managers/test_bmc_ipv6.robot b/redfish/managers/test_bmc_ipv6.robot
index 4cd3a2d..f05a306 100644
--- a/redfish/managers/test_bmc_ipv6.robot
+++ b/redfish/managers/test_bmc_ipv6.robot
@@ -1059,30 +1059,6 @@
END
-Get Address Origin List And Address For Type
- [Documentation] Get address origin list and address for type.
- [Arguments] ${ipv6_address_type}
-
- # Description of the argument(s):
- # ipv6_address_type Type of IPv6 address to be checked.
-
- ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']}
- @{ipv6_addresses}= Get From Dictionary ${resp.dict} IPv6Addresses
-
- ${ipv6_addressorigin_list}= Create List
- ${ipv6_slaac_addr}= Set Variable ${None}
- FOR ${ipv6_address} IN @{ipv6_addresses}
- ${ipv6_addressorigin}= Get From Dictionary ${ipv6_address} AddressOrigin
- Append To List ${ipv6_addressorigin_list} ${ipv6_addressorigin}
- IF '${ipv6_addressorigin}' == '${ipv6_address_type}'
- Set Test Variable ${ipv6_type_addr} ${ipv6_address['Address']}
- END
- END
- Should Contain ${ipv6_addressorigin_list} ${ipv6_address_type}
- Should Not Be Empty ${ipv6_type_addr} msg=${ipv6_address_type} address is not present
- RETURN @{ipv6_addressorigin_list} ${ipv6_type_addr}
-
-
Get Address Origin List And IPv4 or IPv6 Address
[Documentation] Get address origin list and address for type.
[Arguments] ${ip_address_type}