Code Review
/
integration
/
test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Migrate BgpOperations.robot
[integration/test.git]
/
csit
/
libraries
/
BgpOperations.robot
diff --git
a/csit/libraries/BgpOperations.robot
b/csit/libraries/BgpOperations.robot
index 9937c33afed3d9ad17ff32ef2eddc1be6308ccde..1a9591cb10096c57c2d5301fc008f5625bd2e40d 100644
(file)
--- a/
csit/libraries/BgpOperations.robot
+++ b/
csit/libraries/BgpOperations.robot
@@
-18,11
+18,7
@@
${BGP_RIB_URI} bgp-rib:bgp-rib/rib=example-bgp-rib
${BGP_TOPOLOGY_URI} ${TOPOLOGY_URL}=example-ipv4-topology
${VAR_BASE_BGP} ${CURDIR}/../variables/bgpfunctional
${RIB_NAME} example-bgp-rib
${BGP_TOPOLOGY_URI} ${TOPOLOGY_URL}=example-ipv4-topology
${VAR_BASE_BGP} ${CURDIR}/../variables/bgpfunctional
${RIB_NAME} example-bgp-rib
-${OLD_AS_PATH} \n"as-path": {},
-${NEW_AS_PATH} ${EMPTY}
&{APP_PEER} IP=${ODL_SYSTEM_IP} BGP_RIB=${RIB_NAME}
&{APP_PEER} IP=${ODL_SYSTEM_IP} BGP_RIB=${RIB_NAME}
-${NEW_IPV4_ROUTES_LINE} ${EMPTY}
-${OLD_IPV4_ROUTES_LINE} \n"bgp-inet:ipv4-routes": {},
${BGP_CONFIG_SERVER_CMD} bgp-connect -h ${ODL_SYSTEM_IP} -p 7644 add
${VPNV4_ADDR_FAMILY} vpnv4
${DISPLAY_VPN4_ALL} show-bgp --cmd "ip bgp ${VPNV4_ADDR_FAMILY} all"
${BGP_CONFIG_SERVER_CMD} bgp-connect -h ${ODL_SYSTEM_IP} -p 7644 add
${VPNV4_ADDR_FAMILY} vpnv4
${DISPLAY_VPN4_ALL} show-bgp --cmd "ip bgp ${VPNV4_ADDR_FAMILY} all"
@@
-277,16
+273,18
@@
AddNeighbor To BGP Configuration On ODL
Get BGP Configuration On ODL
[Documentation] Get bgp configuration
[Arguments] ${odl_session}
Get BGP Configuration On ODL
[Documentation] Get bgp configuration
[Arguments] ${odl_session}
- ${resp} = RequestsLibrary.G
et Request ${odl_session}
${CONFIG_API}/ebgp:bgp/
+ ${resp} = RequestsLibrary.G
ET On Session alias=${odl_session} url=
${CONFIG_API}/ebgp:bgp/
Log ${resp.text}
RETURN ${resp.text}
Delete BGP Configuration On ODL
[Documentation] Delete BGP
[Arguments] ${odl_session}
Log ${resp.text}
RETURN ${resp.text}
Delete BGP Configuration On ODL
[Documentation] Delete BGP
[Arguments] ${odl_session}
- ${resp} = RequestsLibrary.Delete Request ${odl_session} ${CONFIG_API}/ebgp:bgp/
+ ${resp} = RequestsLibrary.DELETE On Session
+ ... alias=${odl_session}
+ ... url=${CONFIG_API}/ebgp:bgp/
+ ... expected_status=200
Log ${resp.text}
Log ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
RETURN ${resp.text}
Create External Tunnel Endpoint Configuration
RETURN ${resp.text}
Create External Tunnel Endpoint Configuration
@@
-305,13
+303,6
@@
Delete External Tunnel Endpoint Configuration
... mapping=${Kwargs}
... session=session
... mapping=${Kwargs}
... session=session
-Get External Tunnel Endpoint Configuration
- [Documentation] Get bgp configuration
- [Arguments] ${ip}
- ${resp} = RequestsLibrary.Get Request session ${CONFIG_API}/itm:dc-gateway-ip-list/dc-gateway-ip/${ip}/
- Log ${resp.text}
- RETURN ${resp.text}
-
Teardown_Everything
[Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed.
... Tear down imported Resources.
Teardown_Everything
[Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed.
... Tear down imported Resources.
@@
-322,7
+313,9
@@
Teardown_Everything
Check_Example_Bgp_Rib_Content
[Documentation] Check the example-bgp-rib content for string
[Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} not found, but expected.
Check_Example_Bgp_Rib_Content
[Documentation] Check the example-bgp-rib content for string
[Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} not found, but expected.
- ${response} = RequestsLibrary.Get Request ${session} ${REST_API}/${BGP_RIB_URI}?content=nonconfig
+ ${response} = RequestsLibrary.GET On Session
+ ... alias=${session}
+ ... url=${REST_API}/${BGP_RIB_URI}?content=nonconfig
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Contain ${response.text} ${substr} ${error_message} values=False
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Contain ${response.text} ${substr} ${error_message} values=False
@@
-330,7
+323,9
@@
Check_Example_Bgp_Rib_Content
Check_Example_Bgp_Rib_Does_Not_Contain
[Documentation] Check the example-bgp-rib does not contain the string
[Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} found, but not expected.
Check_Example_Bgp_Rib_Does_Not_Contain
[Documentation] Check the example-bgp-rib does not contain the string
[Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} found, but not expected.
- ${response} = RequestsLibrary.Get Request ${session} ${REST_API}/${BGP_RIB_URI}?content=nonconfig
+ ${response} = RequestsLibrary.GET On Session
+ ... alias=${session}
+ ... url=${REST_API}/${BGP_RIB_URI}?content=nonconfig
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Not_Contain ${response.text} ${substr} ${error_message} values=False
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Not_Contain ${response.text} ${substr} ${error_message} values=False
@@
-338,7
+333,9
@@
Check_Example_Bgp_Rib_Does_Not_Contain
Check_Example_IPv4_Topology_Content
[Documentation] Check the example-ipv4-topology content for string
[Arguments] ${session} ${string_to_check}=${EMPTY}
Check_Example_IPv4_Topology_Content
[Documentation] Check the example-ipv4-topology content for string
[Arguments] ${session} ${string_to_check}=${EMPTY}
- ${response} = RequestsLibrary.Get Request ${session} ${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
+ ${response} = RequestsLibrary.GET On Session
+ ... alias=${session}
+ ... url=${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Contain ${response.text} ${string_to_check}
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Contain ${response.text} ${string_to_check}
@@
-346,7
+343,9
@@
Check_Example_IPv4_Topology_Content
Check_Example_IPv4_Topology_Does_Not_Contain
[Documentation] Check the example-ipv4-topology does not contain the string
[Arguments] ${session} ${string_to_check}
Check_Example_IPv4_Topology_Does_Not_Contain
[Documentation] Check the example-ipv4-topology does not contain the string
[Arguments] ${session} ${string_to_check}
- ${response} = RequestsLibrary.Get Request ${session} ${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
+ ${response} = RequestsLibrary.GET On Session
+ ... alias=${session}
+ ... url=${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Not_Contain ${response.text} ${string_to_check}
BuiltIn.Log ${response.status_code}
BuiltIn.Log ${response.text}
BuiltIn.Should_Not_Contain ${response.text} ${string_to_check}
@@
-367,10
+366,7
@@
Bmp_Monitor_Precondition
Bmp_Monitor_Postcondition
[Documentation] Verifies if example-bmp-monitor data contains one peer.
[Arguments] ${session}
Bmp_Monitor_Postcondition
[Documentation] Verifies if example-bmp-monitor data contains one peer.
[Arguments] ${session}
- ${routes_line} = CompareStream.Set_Variable_If_At_Least_Neon
- ... ${NEW_IPV4_ROUTES_LINE}
- ... ${OLD_IPV4_ROUTES_LINE}
- &{mapping} = BuiltIn.Create_Dictionary TOOL_IP=${TOOLS_SYSTEM_IP} ROUTES_LINE=${routes_line}
+ &{mapping} = BuiltIn.Create_Dictionary TOOL_IP=${TOOLS_SYSTEM_IP}
${output} = BuiltIn.Wait_Until_Keyword_Succeeds
... 10x
... 5s
${output} = BuiltIn.Wait_Until_Keyword_Succeeds
... 10x
... 5s
@@
-399,16
+395,13
@@
Odl_To_Play_Template
Play_To_Odl_Template
[Arguments] ${totest} ${dir} ${ipv}=ipv4
Play_To_Odl_Template
[Arguments] ${totest} ${dir} ${ipv}=ipv4
- ${as_path} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_AS_PATH} ${OLD_AS_PATH}
&{adj_rib_in} = BuiltIn.Create_Dictionary
... PATH=peer\=bgp:%2F%2F${TOOLS_SYSTEM_IP}/adj-rib-in
... BGP_RIB=${RIB_NAME}
&{adj_rib_in} = BuiltIn.Create_Dictionary
... PATH=peer\=bgp:%2F%2F${TOOLS_SYSTEM_IP}/adj-rib-in
... BGP_RIB=${RIB_NAME}
- ... AS_PATH=${as_path}
&{effective_rib_in} = BuiltIn.Create_Dictionary
... PATH=peer\=bgp:%2F%2F${TOOLS_SYSTEM_IP}/effective-rib-in
... BGP_RIB=${RIB_NAME}
&{effective_rib_in} = BuiltIn.Create_Dictionary
... PATH=peer\=bgp:%2F%2F${TOOLS_SYSTEM_IP}/effective-rib-in
... BGP_RIB=${RIB_NAME}
- ... AS_PATH=${as_path}
- &{loc_rib} = BuiltIn.Create_Dictionary PATH=loc-rib BGP_RIB=${RIB_NAME} AS_PATH=${as_path}
+ &{loc_rib} = BuiltIn.Create_Dictionary PATH=loc-rib BGP_RIB=${RIB_NAME}
${announce_hex} = OperatingSystem.Get_File ${dir}/${totest}/announce_${totest}.hex
${withdraw_hex} = OperatingSystem.Get_File ${dir}/${totest}/withdraw_${totest}.hex
BgpRpcClient.play_clean
${announce_hex} = OperatingSystem.Get_File ${dir}/${totest}/announce_${totest}.hex
${withdraw_hex} = OperatingSystem.Get_File ${dir}/${totest}/withdraw_${totest}.hex
BgpRpcClient.play_clean
@@
-453,8
+446,7
@@
Play_To_Odl_Non_Removal_Template
${announce_hex} = OperatingSystem.Get_File ${dir}/${totest}/announce_${totest}.hex
BgpRpcClient.play_clean
BgpRpcClient.play_send ${announce_hex}
${announce_hex} = OperatingSystem.Get_File ${dir}/${totest}/announce_${totest}.hex
BgpRpcClient.play_clean
BgpRpcClient.play_send ${announce_hex}
- ${as_path} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_AS_PATH} ${OLD_AS_PATH}
- &{loc_rib} = BuiltIn.Create_Dictionary PATH=loc-rib BGP_RIB=${RIB_NAME} AS_PATH=${as_path}
+ &{loc_rib} = BuiltIn.Create_Dictionary PATH=loc-rib BGP_RIB=${RIB_NAME}
BuiltIn.Wait_Until_Keyword_Succeeds
... 3x
... 2s
BuiltIn.Wait_Until_Keyword_Succeeds
... 3x
... 2s