From b6e65eac5db0ec0342b2958934ba2fdc4e97b47f Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Wed, 24 Aug 2022 20:53:56 -0700 Subject: [PATCH] Fix bgpcep-1node-userfeatures tests Python 2 & the network script (/etc/init.d/network) are not available on CentOS 8. Update the Robot test script to address the incompabilities. Update test scripts still using RESTCONF draft to switch to RFC8040 URLs, status code & data format. Also, fix some URLs which were not properly defined in the Variables section because it included an imported varialbe 'REST_API'. Change-Id: Id52566f332455be7525166a462b47b5cf4c2d295 Signed-off-by: Sangwook Ha --- csit/libraries/BGPSpeaker.robot | 3 +-- csit/libraries/BgpOperations.robot | 12 ++++++------ csit/libraries/ExaBgpLib.robot | 4 ++-- csit/libraries/GoBgpLib.robot | 4 ++-- csit/libraries/PcepOperations.robot | 4 ++-- .../bgpclustering/PrefixcountKeywords.robot | 4 ++-- .../bgpfunct/030_bgp_functional_evpn.robot | 16 ++++++++-------- ..._bgp_functional_rt_constrain_validation.robot | 2 +- .../100_bgp_functional_graceful_restart.robot | 2 +- csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot | 12 +++++++----- .../suites/bgpcep/bgpuser/ibgp_peers_basic.robot | 4 ++-- csit/suites/bgpcep/pcepuser/pcepuser.robot | 6 ++++-- .../l2vpn_evpn/empty_routes/empty_routes.json | 2 +- .../bgpuser/peer_session/restart/location.uri | 2 +- csit/variables/pcepuser/aluminium/variables.py | 2 +- .../tcpmd5user/aluminium/default_off/data.json | 2 +- .../aluminium/default_off/location.uri | 2 +- .../aluminium/default_on_state/data.json | 2 +- .../aluminium/default_on_state/location.uri | 2 +- .../aluminium/default_on_updated_state/data.json | 2 +- .../default_on_updated_state/location.uri | 2 +- .../aluminium/pcep_topology_node/location.uri | 2 +- .../pcep_topology_node_empty/location.uri | 2 +- .../aluminium/update_delegated/location.uri | 2 +- 24 files changed, 50 insertions(+), 47 deletions(-) diff --git a/csit/libraries/BGPSpeaker.robot b/csit/libraries/BGPSpeaker.robot index 4801bf936d..ef2cfa5f1a 100644 --- a/csit/libraries/BGPSpeaker.robot +++ b/csit/libraries/BGPSpeaker.robot @@ -30,7 +30,6 @@ Resource ../variables/Variables.robot *** Variables *** ${BGPSpeaker__OUTPUT_LOG} play.py.out -${PEER_URL} restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F *** Keywords *** Start_BGP_Speaker @@ -56,7 +55,7 @@ Verify_BGP_Speaker_Connection [Arguments] ${session} ${ip} ${connected}=${True} [Documentation] Verifies peer's presence in bgp rib. ${exp_status_code} BuiltIn.Set_Variable_If ${connected} ${200} ${404} - ${url} BuiltIn.Set_Variable ${PEER_URL}${ip} + ${url}= BuiltIn.Set_Variable ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F${ip}?content=nonconfig ${response} RequestsLibrary.Get_Request ${session} ${url} BuiltIn.Should_Be_Equal_As_Numbers ${exp_status_code} ${response.status_code} [Return] ${response.content} diff --git a/csit/libraries/BgpOperations.robot b/csit/libraries/BgpOperations.robot index 7f0cc9dd97..62d3290b39 100644 --- a/csit/libraries/BgpOperations.robot +++ b/csit/libraries/BgpOperations.robot @@ -12,8 +12,8 @@ Resource TemplatedRequests.robot *** Variables *** ${BGP_BMP_DIR} ${CURDIR}/../variables/bgpfunctional/bmp_basic/filled_structure ${BGP_BMP_FEAT_DIR} ${CURDIR}/../variables/bgpfunctional/bmp_basic/empty_structure -${BGP_RIB_URI} ${OPERATIONAL_API}/bgp-rib:bgp-rib/rib/example-bgp-rib -${BGP_TOPOLOGY_URI} ${OPERATIONAL_TOPO_API}/topology/example-ipv4-topology +${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 ${OLD_AS_PATH} \n"as-path": {}, @@ -296,7 +296,7 @@ Teardown_Everything Check_Example_Bgp_Rib_Content [Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} not found, but expected. [Documentation] Check the example-bgp-rib content for string - ${response}= RequestsLibrary.Get Request ${session} ${BGP_RIB_URI} + ${response}= RequestsLibrary.Get Request ${session} ${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 @@ -304,7 +304,7 @@ Check_Example_Bgp_Rib_Content Check_Example_Bgp_Rib_Does_Not_Contain [Arguments] ${session} ${substr} ${error_message}=${JSONKEYSTR} found, but not expected. [Documentation] Check the example-bgp-rib does not contain the string - ${response}= RequestsLibrary.Get Request ${session} ${BGP_RIB_URI} + ${response}= RequestsLibrary.Get Request ${session} ${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 @@ -312,7 +312,7 @@ Check_Example_Bgp_Rib_Does_Not_Contain Check_Example_IPv4_Topology_Content [Arguments] ${session} ${string_to_check}=${EMPTY} [Documentation] Check the example-ipv4-topology content for string - ${response}= RequestsLibrary.Get Request ${session} ${BGP_TOPOLOGY_URI} + ${response}= RequestsLibrary.Get Request ${session} ${REST_API}/${BGP_TOPOLOGY_URI}?content=nonconfig BuiltIn.Log ${response.status_code} BuiltIn.Log ${response.text} BuiltIn.Should_Contain ${response.text} ${string_to_check} @@ -320,7 +320,7 @@ Check_Example_IPv4_Topology_Content Check_Example_IPv4_Topology_Does_Not_Contain [Arguments] ${session} ${string_to_check} [Documentation] Check the example-ipv4-topology does not contain the string - ${response}= RequestsLibrary.Get Request ${session} ${BGP_TOPOLOGY_URI} + ${response}= RequestsLibrary.Get Request ${session} ${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} diff --git a/csit/libraries/ExaBgpLib.robot b/csit/libraries/ExaBgpLib.robot index 270b0a2435..1517a3764c 100644 --- a/csit/libraries/ExaBgpLib.robot +++ b/csit/libraries/ExaBgpLib.robot @@ -20,7 +20,6 @@ Resource ${CURDIR}/BGPcliKeywords.robot *** Variables *** ${EXABGP_KILL_COMMAND} ps axf | grep exabgp | grep -v grep | awk '{print \"kill -9 \" $1}' | sh ${CMD} env exabgp.tcp.port=1790 exabgp --debug -${PEER_CHECK_URL} {$REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F *** Keywords *** Start_ExaBgp @@ -65,8 +64,9 @@ Start_ExaBgp_And_Verify_Connected Verify_ExaBgps_Connection [Arguments] ${session} ${exabgp_ip}=${TOOLS_SYSTEM_IP} ${connected}=${True} [Documentation] Checks peer presence in operational datastore + ${peer_check_url}= BuiltIn.Set_Variable ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F ${exp_status_code}= BuiltIn.Set_Variable_If ${connected} ${200} ${404} - ${rsp}= RequestsLibrary.Get Request ${session} ${PEER_CHECK_URL}${exabgp_ip}?content=nonconfig + ${rsp}= RequestsLibrary.Get Request ${session} ${peer_check_url}${exabgp_ip}?content=nonconfig BuiltIn.Log ${rsp.content} BuiltIn.Should_Be_Equal_As_Numbers ${exp_status_code} ${rsp.status_code} diff --git a/csit/libraries/GoBgpLib.robot b/csit/libraries/GoBgpLib.robot index 89647cac84..39946ebd87 100644 --- a/csit/libraries/GoBgpLib.robot +++ b/csit/libraries/GoBgpLib.robot @@ -20,7 +20,6 @@ Resource ${CURDIR}/SSHKeywords.robot *** Variables *** ${GOBGP_KILL_COMMAND} ps axf | grep gobgp | grep -v grep | awk '{print \"kill -9 \" $1}' | sh ${GOBGP_EXECUTION_COMMAND} /home/jenkins/gobgpd -l debug -f -${PEER_CHECK_URL} ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F *** Keywords *** Start_GoBgp @@ -60,7 +59,8 @@ Start_GoBgp_And_Verify_Connected Verify_GoBgps_Connection [Arguments] ${session} ${gobgp_ip}=${TOOLS_SYSTEM_IP} ${connected}=${True} [Documentation] Checks peer presence in operational datastore + ${peer_check_url}= BuiltIn.Set_Variable ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F ${exp_status_code}= BuiltIn.Set_Variable_If ${connected} ${ALLOWED_STATUS_CODES} ${DELETED_STATUS_CODES} - ${rsp}= RequestsLibrary.Get Request ${session} ${PEER_CHECK_URL}${gobgp_ip}?content=nonconfig + ${rsp}= RequestsLibrary.Get Request ${session} ${peer_check_url}${gobgp_ip}?content=nonconfig BuiltIn.Log ${rsp.content} BuiltIn.Should_Be_Equal_As_Numbers ${exp_status_code} ${rsp.status_code} diff --git a/csit/libraries/PcepOperations.robot b/csit/libraries/PcepOperations.robot index 6455a6a771..43f3a73ed2 100644 --- a/csit/libraries/PcepOperations.robot +++ b/csit/libraries/PcepOperations.robot @@ -21,7 +21,7 @@ ${PCEP_VAR_FOLDER} ${CURDIR}/../variables/tcpmd5user Setup_Pcep_Operations [Documentation] Creates Requests session to be used by subsequent keywords. # Do not append slash at the end uf URL, Requests would add another, resulting in error. - Create_Session pcep_session http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/restconf/operations headers=${HEADERS_XML} auth=${AUTH} + Create_Session pcep_session http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/rests/operations headers=${HEADERS_XML} auth=${AUTH} Teardown_Pcep_Operations [Documentation] Teardown to pair with Setup (otherwise no-op). @@ -65,7 +65,7 @@ Pcep_Json_Is_Success Pcep_Json_Is_Refused [Arguments] ${actual_raw} [Documentation] Given text should be equal to json response when device refuses tunnel removal. - ${expected_raw}= BuiltIn.Set_Variable {"output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}} + ${expected_raw}= BuiltIn.Set_Variable {"network-topology-pcep:output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}} # TODO: Is that JSON worth referencing pcepuser variables from this library? ${expected_normalized}= norm_json.normalize_json_text ${expected_raw} ${actual_normalized}= norm_json.normalize_json_text ${actual_raw} diff --git a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot index 63cd186de0..8fea3550ec 100644 --- a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot +++ b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot @@ -51,7 +51,6 @@ ${DEVICE_CHECK_TIMEOUT} 60s ${RIB_INSTANCE} example-bgp-rib ${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} ${BGP_PEER_NAME} example-bgp-peer -${PEER_CHECK_URL} ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F @{SHARD_MONITOR_LIST} default:config default:operational topology:config topology:operational inventory:config inventory:operational *** Keywords *** @@ -116,8 +115,9 @@ Verify_Bgp_Peer_Connection [Arguments] ${session} ${peer_ip} ${connected}=${True} [Documentation] Checks peer presence in operational datastore # TODO: This keyword is not specific to prefix counting. Find a better place for it. + ${peer_check_url}= BuiltIn.Set_Variable ${REST_API}/bgp-rib:bgp-rib/rib=example-bgp-rib/peer=bgp:%2F%2F ${exp_status_code}= BuiltIn.Set_Variable_If ${connected} ${200} ${404} - ${rsp}= RequestsLibrary.Get Request ${session} ${PEER_CHECK_URL}${peer_ip}?content=nonconfig + ${rsp}= RequestsLibrary.Get Request ${session} ${peer_check_url}${peer_ip}?content=nonconfig BuiltIn.Log ${rsp.content} BuiltIn.Should_Be_Equal_As_Numbers ${exp_status_code} ${rsp.status_code} diff --git a/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot b/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot index 584be5f9ab..58d316ecbb 100644 --- a/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot +++ b/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot @@ -353,9 +353,9 @@ Start_Suite RequestsLibrary.Create Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} SSHLibrary.Put File ${PLAY_SCRIPT} . SSHKeywords.Assure_Library_Ipaddr target_dir=. - BuiltIn.Set_Suite_Variable ${EVPN_CONF_URL} /restconf/config/bgp-rib:application-rib/${ODL_SYSTEM_IP}/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes - BuiltIn.Set_Suite_Variable ${EVPN_LOC_RIB} /restconf/operational/bgp-rib:bgp-rib/rib/${RIB_NAME}/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes - BuiltIn.Set_Suite_Variable ${EVPN_FAMILY_LOC_RIB} /restconf/operational/bgp-rib:bgp-rib/rib/${RIB_NAME}/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/ + BuiltIn.Set_Suite_Variable ${EVPN_CONF_URL} /rests/data/bgp-rib:application-rib=${ODL_SYSTEM_IP}/tables=odl-bgp-evpn%3Al2vpn-address-family,odl-bgp-evpn%3Aevpn-subsequent-address-family/odl-bgp-evpn:evpn-routes + BuiltIn.Set_Suite_Variable ${EVPN_LOC_RIB} /rests/data/bgp-rib:bgp-rib/rib=${RIB_NAME}/loc-rib/tables=odl-bgp-evpn%3Al2vpn-address-family,odl-bgp-evpn%3Aevpn-subsequent-address-family/odl-bgp-evpn:evpn-routes?content=nonconfig + BuiltIn.Set_Suite_Variable ${EVPN_FAMILY_LOC_RIB} /rests/data/bgp-rib:bgp-rib/rib=${RIB_NAME}/loc-rib/tables=odl-bgp-evpn%3Al2vpn-address-family,odl-bgp-evpn%3Aevpn-subsequent-address-family?content=nonconfig ${evpn_routes_line} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_EVPN_ROUTES_LINE} ${OLD_EVPN_ROUTES_LINE} &{mapping} BuiltIn.Create_Dictionary EVPN_ROUTES=${evpn_routes_line} ${EMPTY_ROUTES} = TemplatedRequests.Resolve_Text_From_Template_File ${EVPN_DIR}/empty_routes empty_routes.json ${mapping} @@ -388,8 +388,8 @@ Odl_To_Play_Template BgpRpcClient.play_clean ${resp} = RequestsLibrary.Post_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} data=${post_data_xml} headers=${HEADERS_XML} BuiltIn.Log ${resp.content} - BuiltIn.Should_Be_Equal_As_Numbers ${resp.status_code} 204 - ${resp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} headers=${HEADERS_XML} + BuiltIn.Should_Be_Equal_As_Numbers ${resp.status_code} 201 + ${resp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL}?content=config headers=${HEADERS_XML} BuiltIn.Log ${resp.content} ${aupdate} = BuiltIn.Wait_Until_Keyword_Succeeds 4x 2s Get_Update_Content BuiltIn.Log ${aupdate} @@ -423,7 +423,7 @@ Play_To_Odl_Template [Teardown] Withdraw_Route_And_Verify ${withdraw_hex} Verify_Test_Preconditions - ${resp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} + ${resp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL}?content=config BuiltIn.Should_Contain ${DELETED_STATUS_CODES} ${resp.status_code} ${rsp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_FAMILY_LOC_RIB} headers=${HEADERS} TemplatedRequests.Normalize_Jsons_And_Compare ${EMPTY_ROUTES} ${rsp.content} @@ -432,11 +432,11 @@ Remove_Configured_Routes [Documentation] Removes the route if present. First GET is for debug purposes. ${rsp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_LOC_RIB} headers=${HEADERS} Log ${rsp.content} - ${rsp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} headers=${HEADERS} + ${rsp} = RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL}?content=config headers=${HEADERS} Log ${rsp.content} BuiltIn.Return_From_Keyword_If ${rsp.status_code} in ${DELETED_STATUS_CODES} ${resp} = RequestsLibrary.Delete_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} - BuiltIn.Should_Be_Equal_As_Numbers ${resp.status_code} 200 + BuiltIn.Should_Be_Equal_As_Numbers ${resp.status_code} 204 Withdraw_Route_And_Verify [Arguments] ${withdraw_hex} diff --git a/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot b/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot index fa834c0285..e1aa8ed298 100644 --- a/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot +++ b/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot @@ -161,7 +161,7 @@ Stop_Suite Start_Bgp_Peer [Arguments] ${ip} ${as_number} ${port} ${filename} [Documentation] Starts bgp peer. - ${command} = BuiltIn.Set_Variable python play.py --amount 0 --myip=${ip} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --asnumber=${as_number} --peerport=${ODL_BGP_PORT} --port=${port} --usepeerip --debug --allf --wfr 1 &> ${filename} & + ${command} = BuiltIn.Set_Variable python3 play.py --amount 0 --myip=${ip} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --asnumber=${as_number} --peerport=${ODL_BGP_PORT} --port=${port} --usepeerip --debug --allf --wfr 1 &> ${filename} & BuiltIn.Log ${command} ${output} = SSHLibrary.Write ${command} diff --git a/csit/suites/bgpcep/bgpfunct/100_bgp_functional_graceful_restart.robot b/csit/suites/bgpcep/bgpfunct/100_bgp_functional_graceful_restart.robot index 3fc49b2d26..3d7bbc3c61 100644 --- a/csit/suites/bgpcep/bgpfunct/100_bgp_functional_graceful_restart.robot +++ b/csit/suites/bgpcep/bgpfunct/100_bgp_functional_graceful_restart.robot @@ -221,7 +221,7 @@ Start_Bgp_Peer [Arguments] ${prefix}=${FIRST_PREFIX} ${amount}=1 ${myip}=${PEER1_IP} ${port}=${PEER1_PORT} ${as_number}=${PEER1_AS} ${grace}=0 ... ${log_name}=play.py.out ${multiple}=& ${ipv6}=${EMPTY} [Documentation] Starts bgp peer. - ${command} = BuiltIn.Set_Variable python play.py${ipv6} --firstprefix ${prefix} --prefixlen ${PREFIX_LEN} --amount ${amount} --myip ${myip} --myport ${BGP_TOOL_PORT} --peerip ${ODL_SYSTEM_IP} --peerport ${ODL_BGP_PORT} --port ${port} --usepeerip --nexthop ${NEXT_HOP} --asnumber ${as_number} --debug --grace ${grace} --wfr 1 &> ${log_name} ${multiple} + ${command} = BuiltIn.Set_Variable python3 play.py${ipv6} --firstprefix ${prefix} --prefixlen ${PREFIX_LEN} --amount ${amount} --myip ${myip} --myport ${BGP_TOOL_PORT} --peerip ${ODL_SYSTEM_IP} --peerport ${ODL_BGP_PORT} --port ${port} --usepeerip --nexthop ${NEXT_HOP} --asnumber ${as_number} --debug --grace ${grace} --wfr 1 &> ${log_name} ${multiple} BuiltIn.Log ${command} ${output} = SSHLibrary.Write ${command} diff --git a/csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot b/csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot index c165bd897c..d523f5bf6f 100644 --- a/csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot +++ b/csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot @@ -50,6 +50,7 @@ ${IPV6_IP} 2607:f0d0:1002:0011:0000:0000:0000:0002 ${IPV6_IP_2} 2607:f0d0:1002:11:0:0:0:2 ${IPV6_IP_3} 2607:f0d0:1002:11::2 ${IPV6_IP_GW} 2607:f0d0:1002:0011:0000:0000:0000:0001 +${IPV6_PREFIX_LENGTH} 64 ${HOLDTIME} 180 ${RIB_INSTANCE} example-bgp-rib @@ -319,11 +320,12 @@ Stop_Suite Configure_Ipv6_Network [Documentation] Reconfigures basic network settings on controller - SSHLibrary.Execute_Command sudo sh -c 'echo "NETWORKING_IPV6=yes" >> /etc/sysconfig/network' - SSHLibrary.Execute_Command sudo sh -c 'echo "IPV6INIT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0' - SSHLibrary.Execute_Command sudo sh -c 'echo "IPV6ADDR=${IPV6_IP}" >> /etc/sysconfig/network-scripts/ifcfg-eth0' - SSHLibrary.Execute_Command sudo sh -c 'echo "IPV6_DEFAULTGW=${IPV6_IP_GW}" >> /etc/sysconfig/network-scripts/ifcfg-eth0' - SSHLibrary.Execute_Command sudo /etc/init.d/network restart + SSHLibrary.Execute_Command sudo ip -6 addr add ${IPV6_IP}/${IPV6_PREFIX_LENGTH} dev eth0 + SSHLibrary.Execute_Command sudo ip -6 route add default via ${IPV6_IP_GW} + ${stdout}= SSHLibrary.Execute_Command sudo ip -6 addr show + Log ${stdout} + ${stdout}= SSHLibrary.Execute_Command sudo ip -6 route show + Log ${stdout} Verify_Rib_Status_Empty [Documentation] Verifies that example-ipv6-topology is empty diff --git a/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot index d9f91c06b3..195a1c0de8 100644 --- a/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot +++ b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot @@ -62,8 +62,8 @@ ${BGP_PEER1_PREFIX_COUNT} ${PREFIX_COUNT} ${BGP_PEER2_PREFIX_COUNT} ${PREFIX_COUNT} ${BGP_PEER1_LOG_FILE} bgp_peer1.log ${BGP_PEER2_LOG_FILE} bgp_peer2.log -${BGP_PEER1_COMMAND} python play.py --firstprefix ${BGP_PEER1_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER1_PREFIX_LEN} --amount ${BGP_PEER1_PREFIX_COUNT} --myip=${BGP_PEER1_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER1_LOG_FILE} -${BGP_PEER2_COMMAND} python play.py --firstprefix ${BGP_PEER2_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER2_PREFIX_LEN} --amount ${BGP_PEER2_PREFIX_COUNT} --myip=${BGP_PEER2_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER2_LOG_FILE} +${BGP_PEER1_COMMAND} python3 play.py --firstprefix ${BGP_PEER1_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER1_PREFIX_LEN} --amount ${BGP_PEER1_PREFIX_COUNT} --myip=${BGP_PEER1_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER1_LOG_FILE} +${BGP_PEER2_COMMAND} python3 play.py --firstprefix ${BGP_PEER2_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER2_PREFIX_LEN} --amount ${BGP_PEER2_PREFIX_COUNT} --myip=${BGP_PEER2_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER2_LOG_FILE} ${BGP_PEER1_OPTIONS} &>${BGP_PEER1_LOG_FILE} ${BGP_PEER2_OPTIONS} &>${BGP_PEER2_LOG_FILE} ${DEFAULT_LOG_CHECK_TIMEOUT} 20s diff --git a/csit/suites/bgpcep/pcepuser/pcepuser.robot b/csit/suites/bgpcep/pcepuser/pcepuser.robot index 96cef0ceb2..6e15be2125 100644 --- a/csit/suites/bgpcep/pcepuser/pcepuser.robot +++ b/csit/suites/bgpcep/pcepuser/pcepuser.robot @@ -23,7 +23,7 @@ Variables ../../../variables/pcepuser/${ODL_STREAM}/variables.py ${TO *** Variables *** ${CONFIG_SESSION} session -${PATH_SESSION_URI} node/pcc:%2F%2F${TOOLS_SYSTEM_IP}/path-computation-client +${PATH_SESSION_URI} node=pcc:%2F%2F${TOOLS_SYSTEM_IP}/network-topology-pcep:path-computation-client ${PCEP_VARIABLES_FOLDER} ${CURDIR}/../../../variables/pcepuser/${ODL_STREAM} *** Test Cases *** @@ -145,6 +145,8 @@ Compare_Topology ... Error codes and normalized jsons should match exactly. # TODO: Add Node Session State Check For Oxygen, see tcpmd5user # TODO: Possibly remake all tests with TemplatedRequests - ${response}= RequestsLibrary.Get Request ${CONFIG_SESSION} ${OPERATIONAL_TOPO_API}/topology/pcep-topology/${uri} + ${topology_uri}= BuiltIn.Set_Variable_If '${uri}'=='${EMPTY}' + ... ${REST_API}/${TOPOLOGY_URL}=pcep-topology?content=nonconfig ${REST_API}/${TOPOLOGY_URL}=pcep-topology/${uri}?content=nonconfig + ${response}= RequestsLibrary.Get Request ${CONFIG_SESSION} ${topology_uri} BuiltIn.Should_Be_Equal_As_Strings ${response.status_code} 200 TemplatedRequests.Normalize_Jsons_And_Compare ${exp} ${response.text} diff --git a/csit/variables/bgpfunctional/l2vpn_evpn/empty_routes/empty_routes.json b/csit/variables/bgpfunctional/l2vpn_evpn/empty_routes/empty_routes.json index d706065ff0..ac41fdebb9 100644 --- a/csit/variables/bgpfunctional/l2vpn_evpn/empty_routes/empty_routes.json +++ b/csit/variables/bgpfunctional/l2vpn_evpn/empty_routes/empty_routes.json @@ -1,5 +1,5 @@ { - "tables": [ + "bgp-rib:tables": [ { "afi": "odl-bgp-evpn:l2vpn-address-family", "safi": "odl-bgp-evpn:evpn-subsequent-address-family",$EVPN_ROUTES diff --git a/csit/variables/bgpuser/peer_session/restart/location.uri b/csit/variables/bgpuser/peer_session/restart/location.uri index 27e5b5041a..e297cbccf9 100644 --- a/csit/variables/bgpuser/peer_session/restart/location.uri +++ b/csit/variables/bgpuser/peer_session/restart/location.uri @@ -1 +1 @@ -restconf/operations/bgp-peer-rpc:reset-session +rests/operations/bgp-peer-rpc:reset-session diff --git a/csit/variables/pcepuser/aluminium/variables.py b/csit/variables/pcepuser/aluminium/variables.py index 760d50b512..dda6c50322 100644 --- a/csit/variables/pcepuser/aluminium/variables.py +++ b/csit/variables/pcepuser/aluminium/variables.py @@ -39,7 +39,7 @@ def get_variables(mininet_ip): variables[ "off_json" ] = """{ - "topology": [ + "network-topology:topology": [ { "topology-id": "pcep-topology", "topology-types": { diff --git a/csit/variables/tcpmd5user/aluminium/default_off/data.json b/csit/variables/tcpmd5user/aluminium/default_off/data.json index b1219657d6..8d847fa45b 100644 --- a/csit/variables/tcpmd5user/aluminium/default_off/data.json +++ b/csit/variables/tcpmd5user/aluminium/default_off/data.json @@ -1,5 +1,5 @@ { - "topology": [ + "network-topology:topology": [ { "topology-id": "pcep-topology", "topology-types": { diff --git a/csit/variables/tcpmd5user/aluminium/default_off/location.uri b/csit/variables/tcpmd5user/aluminium/default_off/location.uri index 7a4b1bf20d..8e7a122a40 100644 --- a/csit/variables/tcpmd5user/aluminium/default_off/location.uri +++ b/csit/variables/tcpmd5user/aluminium/default_off/location.uri @@ -1 +1 @@ -restconf/operational/network-topology:network-topology/topology/pcep-topology +rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig diff --git a/csit/variables/tcpmd5user/aluminium/default_on_state/data.json b/csit/variables/tcpmd5user/aluminium/default_on_state/data.json index 6ab106d826..01393b0e4f 100644 --- a/csit/variables/tcpmd5user/aluminium/default_on_state/data.json +++ b/csit/variables/tcpmd5user/aluminium/default_on_state/data.json @@ -1,5 +1,5 @@ { - "topology": [ + "network-topology:topology": [ { "node": [ { diff --git a/csit/variables/tcpmd5user/aluminium/default_on_state/location.uri b/csit/variables/tcpmd5user/aluminium/default_on_state/location.uri index 7a4b1bf20d..8e7a122a40 100644 --- a/csit/variables/tcpmd5user/aluminium/default_on_state/location.uri +++ b/csit/variables/tcpmd5user/aluminium/default_on_state/location.uri @@ -1 +1 @@ -restconf/operational/network-topology:network-topology/topology/pcep-topology +rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig diff --git a/csit/variables/tcpmd5user/aluminium/default_on_updated_state/data.json b/csit/variables/tcpmd5user/aluminium/default_on_updated_state/data.json index 7a339aafc3..0d5e2e3cbf 100644 --- a/csit/variables/tcpmd5user/aluminium/default_on_updated_state/data.json +++ b/csit/variables/tcpmd5user/aluminium/default_on_updated_state/data.json @@ -1,5 +1,5 @@ { - "topology": [ + "network-topology:topology": [ { "node": [ { diff --git a/csit/variables/tcpmd5user/aluminium/default_on_updated_state/location.uri b/csit/variables/tcpmd5user/aluminium/default_on_updated_state/location.uri index 7a4b1bf20d..8e7a122a40 100644 --- a/csit/variables/tcpmd5user/aluminium/default_on_updated_state/location.uri +++ b/csit/variables/tcpmd5user/aluminium/default_on_updated_state/location.uri @@ -1 +1 @@ -restconf/operational/network-topology:network-topology/topology/pcep-topology +rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig diff --git a/csit/variables/tcpmd5user/aluminium/pcep_topology_node/location.uri b/csit/variables/tcpmd5user/aluminium/pcep_topology_node/location.uri index 814155494d..b2a9868895 100644 --- a/csit/variables/tcpmd5user/aluminium/pcep_topology_node/location.uri +++ b/csit/variables/tcpmd5user/aluminium/pcep_topology_node/location.uri @@ -1 +1 @@ -restconf/config/network-topology:network-topology/topology/pcep-topology/node/$IP +rests/data/network-topology:network-topology/topology=pcep-topology/node=$IP diff --git a/csit/variables/tcpmd5user/aluminium/pcep_topology_node_empty/location.uri b/csit/variables/tcpmd5user/aluminium/pcep_topology_node_empty/location.uri index 814155494d..b2a9868895 100644 --- a/csit/variables/tcpmd5user/aluminium/pcep_topology_node_empty/location.uri +++ b/csit/variables/tcpmd5user/aluminium/pcep_topology_node_empty/location.uri @@ -1 +1 @@ -restconf/config/network-topology:network-topology/topology/pcep-topology/node/$IP +rests/data/network-topology:network-topology/topology=pcep-topology/node=$IP diff --git a/csit/variables/tcpmd5user/aluminium/update_delegated/location.uri b/csit/variables/tcpmd5user/aluminium/update_delegated/location.uri index 7193120a42..51b2c6939e 100644 --- a/csit/variables/tcpmd5user/aluminium/update_delegated/location.uri +++ b/csit/variables/tcpmd5user/aluminium/update_delegated/location.uri @@ -1 +1 @@ -restconf/operations/network-topology-pcep:update-lsp +rests/operations/network-topology-pcep:update-lsp -- 2.36.6