Fix bgpcep-1node-userfeatures tests 39/102239/11
authorSangwook Ha <sangwook.ha@verizon.com>
Thu, 25 Aug 2022 03:53:56 +0000 (20:53 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Mon, 29 Aug 2022 06:09:01 +0000 (23:09 -0700)
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 <sangwook.ha@verizon.com>
24 files changed:
csit/libraries/BGPSpeaker.robot
csit/libraries/BgpOperations.robot
csit/libraries/ExaBgpLib.robot
csit/libraries/GoBgpLib.robot
csit/libraries/PcepOperations.robot
csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot
csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot
csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot
csit/suites/bgpcep/bgpfunct/100_bgp_functional_graceful_restart.robot
csit/suites/bgpcep/bgpfunct/bgp_ipv6_basic.robot
csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot
csit/suites/bgpcep/pcepuser/pcepuser.robot
csit/variables/bgpfunctional/l2vpn_evpn/empty_routes/empty_routes.json
csit/variables/bgpuser/peer_session/restart/location.uri
csit/variables/pcepuser/aluminium/variables.py
csit/variables/tcpmd5user/aluminium/default_off/data.json
csit/variables/tcpmd5user/aluminium/default_off/location.uri
csit/variables/tcpmd5user/aluminium/default_on_state/data.json
csit/variables/tcpmd5user/aluminium/default_on_state/location.uri
csit/variables/tcpmd5user/aluminium/default_on_updated_state/data.json
csit/variables/tcpmd5user/aluminium/default_on_updated_state/location.uri
csit/variables/tcpmd5user/aluminium/pcep_topology_node/location.uri
csit/variables/tcpmd5user/aluminium/pcep_topology_node_empty/location.uri
csit/variables/tcpmd5user/aluminium/update_delegated/location.uri

index 4801bf936d94e1722ddbc8a43f72340272113015..ef2cfa5f1adf5af5ac9129be57cd82cc42d7ded9 100644 (file)
@@ -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}
index 7f0cc9dd976b384fa7dc44d5c2075e5c53e75c9f..62d3290b39447b0468b849dd3ebd4183361c1a7a 100644 (file)
@@ -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}
index 270b0a24351d48fa736140582ea634c4177508fb..1517a3764c11d50dda1aeb89cac61dc28ec8756c 100644 (file)
@@ -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}
 
index 89647cac84aaad4a854fd963ca4c82135c3bc7bb..39946ebd8786dac871c22fdab3a7b830bb9d96b3 100644 (file)
@@ -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}
index 6455a6a77165a1f884f40018cd03a6011095d56e..43f3a73ed24b3cea4e4f6dde5666f667d381880e 100644 (file)
@@ -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}
index 63cd186de046f3692abc2c8f6b829f877ff51224..8fea3550ec95f880da89305ea201438ca68414d9 100644 (file)
@@ -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}
 
index 584be5f9ab3d4b53e9bbcafb3d8158ef5533c0d8..58d316ecbb80281f69d3f3393ac1eb3f3f49870c 100644 (file)
@@ -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}
index fa834c0285d7686baf7878929bde687913d27633..e1aa8ed29813ba1bd9dfe53483563a48b8c279b4 100644 (file)
@@ -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}
 
index 3fc49b2d266d0102db0a1b8db574b166cac4b9c5..3d7bbc3c6116fc250f533720ba93d167bea34eff 100644 (file)
@@ -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}
 
index c165bd897c0d44b9c07ef78066a38e4c486c7b1c..d523f5bf6fce2009fb02e05e9cb2543d43e328f0 100644 (file)
@@ -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
index d9f91c06b3a734ed7da31688b3f7fb552f2dae52..195a1c0de81e63dba9c4aea5c73561e05455e921 100644 (file)
@@ -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
index 96cef0ceb241f11d4f35a6b95225c7d5197602ab..6e15be212506a56df06e2fcd20222272362bf9b5 100644 (file)
@@ -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}
index d706065ff065e0231b9791cc26b365d8ac9ffdfc..ac41fdebb9a28e8ac5eca9fe1799d1dee562a2ac 100644 (file)
@@ -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
index 27e5b5041acaaed7a7a9ac8cd38fc82bde63dfac..e297cbccf91b2102b60189ef8cf5ac78451604a0 100644 (file)
@@ -1 +1 @@
-restconf/operations/bgp-peer-rpc:reset-session
+rests/operations/bgp-peer-rpc:reset-session
index 760d50b51221bec211cdac27b97f114337aa1d68..dda6c503228fd871534ef2c5fa143cbf1ffc4d05 100644 (file)
@@ -39,7 +39,7 @@ def get_variables(mininet_ip):
     variables[
         "off_json"
     ] = """{
- "topology": [
+ "network-topology:topology": [
   {
    "topology-id": "pcep-topology",
    "topology-types": {
index b1219657d6872d9029f4edb4ae097acf1a3d1e7f..8d847fa45b96fe9f8d661700e377d3cc00742326 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "topology": [
+    "network-topology:topology": [
         {
             "topology-id": "pcep-topology",
             "topology-types": {
index 7a4b1bf20d86d50e6563012360981ea292e58622..8e7a122a40e62a138b658da4bafe817f698f8de8 100644 (file)
@@ -1 +1 @@
-restconf/operational/network-topology:network-topology/topology/pcep-topology
+rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig
index 6ab106d8265b054010a71aac3989fabc56fd06b5..01393b0e4ff67e010a2005863607c31aa71c5b0e 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "topology": [
+    "network-topology:topology": [
         {
             "node": [
                 {
index 7a4b1bf20d86d50e6563012360981ea292e58622..8e7a122a40e62a138b658da4bafe817f698f8de8 100644 (file)
@@ -1 +1 @@
-restconf/operational/network-topology:network-topology/topology/pcep-topology
+rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig
index 7a339aafc39866396f8dba802a6506177eb34f1a..0d5e2e3cbf2549f448b096407cf8b29755368bc7 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "topology": [
+    "network-topology:topology": [
         {
             "node": [
                 {
index 7a4b1bf20d86d50e6563012360981ea292e58622..8e7a122a40e62a138b658da4bafe817f698f8de8 100644 (file)
@@ -1 +1 @@
-restconf/operational/network-topology:network-topology/topology/pcep-topology
+rests/data/network-topology:network-topology/topology=pcep-topology?content=nonconfig
index 814155494d5f33f423eaf20bbcc1fcca1e36f0f3..b2a98688950851926ce69deab71d95f2e491aca4 100644 (file)
@@ -1 +1 @@
-restconf/config/network-topology:network-topology/topology/pcep-topology/node/$IP
+rests/data/network-topology:network-topology/topology=pcep-topology/node=$IP
index 814155494d5f33f423eaf20bbcc1fcca1e36f0f3..b2a98688950851926ce69deab71d95f2e491aca4 100644 (file)
@@ -1 +1 @@
-restconf/config/network-topology:network-topology/topology/pcep-topology/node/$IP
+rests/data/network-topology:network-topology/topology=pcep-topology/node=$IP
index 7193120a42b2794a4689da24f0502865083c7f4d..51b2c6939e7519d507a0bdde6a0f793e155fcfec 100644 (file)
@@ -1 +1 @@
-restconf/operations/network-topology-pcep:update-lsp
+rests/operations/network-topology-pcep:update-lsp