Library RequestsLibrary
Library SSHLibrary
Resource ../../../variables/Variables.robot
+Resource ../../../libraries/CompareStream.robot
Resource ../../../libraries/ExaBgpLib.robot
Resource ../../../libraries/SetupUtils.robot
Resource ../../../libraries/TemplatedRequests.robot
${HOLDTIME} 180
${RIB_INSTANCE} example-bgp-rib
${CONFIG_SESSION} config-session
+${OLD_AS_PATH} \n"as-path": {},
+${NEW_AS_PATH} ${EMPTY}
*** Test Cases ***
Verify_Rib_Empty
# gets and outputs full rib output for debug purposes if one of the peers reports faulty data.
${output} TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/rib_state session=${CONFIG_SESSION}
BuiltIn.Log ${output}
+ ${AS_PATH} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_AS_PATH} ${OLD_AS_PATH}
: FOR ${index} IN @{NUMBERS}
- \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index}
+ \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} AS_PATH=${AS_PATH}
\ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping}
\ ... session=${CONFIG_SESSION} verify=True
- &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP}
+ &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} AS_PATH=${AS_PATH}
# application peer verification
BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/app_peer_rib mapping=${mapping} session=${CONFIG_SESSION}
... verify=True
"bgp-inet:ipv4-routes": {
"ipv4-route": [
{
- "attributes": {
- "as-path": {},
+ "attributes": {$AS_PATH
"ipv4-next-hop": {
"global": "12.0.255.254"
},
"route-key": "2.1.1.0/24"
},
{
- "attributes": {
- "as-path": {},
+ "attributes": {$AS_PATH
"ipv4-next-hop": {
"global": "12.1.255.254"
},
"route-key": "2.2.1.0/24"
},
{
- "attributes": {
- "as-path": {},
+ "attributes": {$AS_PATH
"ipv4-next-hop": {
"global": "12.3.255.254"
},