X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FL2GatewayOperations.robot;h=4e7e085be50a663c800205dd071a7545a36fb418;hb=7f810b633b22b2bd64be2a51112033bf10b367d6;hp=82f24be785c118c0e15e894c48fe799f65d1fc49;hpb=cdc4d22a6cd9cb128c50bf71768a937ce8124869;p=integration%2Ftest.git diff --git a/csit/libraries/L2GatewayOperations.robot b/csit/libraries/L2GatewayOperations.robot index 82f24be785..4e7e085be5 100644 --- a/csit/libraries/L2GatewayOperations.robot +++ b/csit/libraries/L2GatewayOperations.robot @@ -87,12 +87,15 @@ Update And Verify L2Gateway [Return] ${l2gw_output} Delete L2Gateway - [Arguments] ${gw_name} + [Arguments] ${gw_name} ${check_for_null}=False [Documentation] Keyword to delete the L2 Gateway ${gw_name} received in argument. + ... If ${check_for_null} is True return of 404 is treated as empty list. From Neon onwards, + ... an empty list is always returned as null, giving 404 on rest call. ${output}= Exec Command ${OS_CNTL_CONN_ID} ${L2GW_DELETE} ${gw_name} Log ${output} @{list_to_check}= Create List ${gw_name} - Utils.Check For Elements Not At URI ${L2GW_LIST_REST_URL} ${list_to_check} session + BuiltIn.Wait Until Keyword Succeeds 5s 1s Utils.Check For Elements Not At URI ${L2GW_LIST_REST_URL} ${list_to_check} session + ... check_for_null=${check_for_null} Create Verify L2Gateway Connection [Arguments] ${gw_name} ${net_name} @@ -118,13 +121,16 @@ Verify L2Gateway Connection Utils.Check For Elements At URI ${L2GW_CONN_LIST_REST_URL} ${list_to_check} session Delete L2Gateway Connection - [Arguments] ${gw_name} + [Arguments] ${gw_name} ${check_for_null}=False [Documentation] Delete the L2 Gateway connection existing for Gateway ${gw_name} received in argument (Using Neutron CLI). + ... If ${check_for_null} is True return of 404 is treated as empty list. From Neon onwards, an empty list is always + ... returned as null, giving 404 on rest call. ${l2gw_conn_id}= OpenStackOperations.Get L2gw Connection Id ${gw_name} ${output}= Exec Command ${OS_CNTL_CONN_ID} ${L2GW_CONN_DELETE} ${l2gw_conn_id} - @{list_to_check}= Create List ${l2gw_conn_id} - Utils.Check For Elements Not At URI ${L2GW_CONN_LIST_REST_URL} ${list_to_check} session Log ${output} + @{list_to_check}= Create List ${l2gw_conn_id} + BuiltIn.Wait Until Keyword Succeeds 5s 1s Utils.Check For Elements Not At URI ${L2GW_CONN_LIST_REST_URL} ${list_to_check} session + ... check_for_null=${check_for_null} Update Port For Hwvtep [Arguments] ${port_name} @@ -162,8 +168,9 @@ Verify Strings In Command Output [Arguments] ${conn_id} ${command} @{string_list} [Documentation] Keyword to run the ${command} in ${conn_id} and verify if the output contains the list @{string_list}. ${output}= Exec Command ${conn_id} ${command} - : FOR ${item} IN @{string_list} - \ Should Contain ${output} ${item} + FOR ${item} IN @{string_list} + Should Contain ${output} ${item} + END Verify Ping In Namespace Extra Timeout [Arguments] ${ns_name} ${ns_port_mac} ${vm_ip} ${conn_id}=${hwvtep_conn_id} ${hwvtep_ip}=${HWVTEP_IP} @@ -193,18 +200,18 @@ Verify Nova VM IP @{vm_ip} ${dhcp_ip} = Get VM IPs ${vm_name} Should Not Contain ${vm_ip} None Should Not Contain ${dhcp_ip} None - [Return] @{vm_ip}[0] + [Return] ${vm_ip}[0] Get L2gw Debug Info [Documentation] Keyword to collect the general debug information required for HWVTEP Test Suite. Exec Command ${hwvtep_conn_id} ${OVSDB_CLIENT_DUMP} OpenStackOperations.Get Test Teardown Debugs ${resp} = RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:external-tunnel-list/ - Log ${resp.content} + Log ${resp.text} ${resp} = RequestsLibrary.Get Request session ${CONFIG_API}/network-topology:network-topology/topology/hwvtep:1 - Log ${resp.content} + Log ${resp.text} ${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_API}/network-topology:network-topology/topology/hwvtep:1 - Log ${resp.content} + Log ${resp.text} Exec Command ${OS_CNTL_CONN_ID} cat /etc/neutron/neutron.conf Exec Command ${OS_CNTL_CONN_ID} cat /etc/neutron/l2gw_plugin.ini Exec Command ${OS_CNTL_CONN_ID} ps -ef | grep neutron-server @@ -224,8 +231,9 @@ Verify Vtep List [Arguments] ${conn_id} ${table_name} @{list} [Documentation] Keyword to run vtep-ctl list for the table ${table_name} and verify the list @{list} contents exists in output. ${output}= Exec Command ${conn_id} ${VTEP LIST} ${table_name} - : FOR ${item} IN @{list} - \ Should Contain ${output} ${item} + FOR ${item} IN @{list} + Should Contain ${output} ${item} + END Get Vtep List [Arguments] ${table_name} ${conn_id}=${hwvtep_conn_id} @@ -283,18 +291,19 @@ Verify Elan Flow Entries Should Contain ${flow_output} table=50 ${sMac_output} = Get Lines Containing String ${flow_output} table=50 Log ${sMac_output} - : FOR ${sMacAddr} IN @{srcMacAddrs} - \ ${resp}= Should Contain ${sMac_output} dl_src=${sMacAddr} + FOR ${sMacAddr} IN @{srcMacAddrs} + ${resp}= Should Contain ${sMac_output} dl_src=${sMacAddr} + END Should Contain ${flow_output} table=51 ${dMac_output} = Get Lines Containing String ${flow_output} table=51 Log ${dMac_output} - : FOR ${dMacAddr} IN @{destMacAddrs} - \ ${resp}= Should Contain ${dMac_output} dl_dst=${dMacAddr} + FOR ${dMacAddr} IN @{destMacAddrs} + ${resp}= Should Contain ${dMac_output} dl_dst=${dMacAddr} + END Should Contain ${flow_output} table=52 ${sMac_output} = Get Lines Containing String ${flow_output} table=52 Log ${sMac_output} Cleanup L2GW Optional Resources [Documentation] Cleanup resources that are only allocated on certain combos... - CompareStream.Run_Keyword_If_At_Most_Nitrogen BuiltIn.Pass_Execution Only run on oxygen and later OpenStackOperations.Delete Port ${HWVTEP_PORT_3}