SXP: Log routing
[integration/test.git] / csit / libraries / SxpLib.robot
index 724e220eedce90fe908978e91213956422abe5b4..da4e5d4bb1b4c3d1ca5e49f6e9e2ff2b4ac64945 100644 (file)
@@ -303,17 +303,17 @@ Check Binding Range Negative
 
 Setup SXP Environment
     [Arguments]    ${node_range}=1
-    [Documentation]    Create session to Controller, ${node_range} parameter specifies number of nodes to be created
+    [Documentation]    Create session to Controller, ${node_range} parameter specifies number of localhost nodes to be created on ${ODL_SYSTEM_IP}.
     RequestsLibrary.Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    timeout=${DEFAULT_TIMEOUT_HTTP}    max_retries=0
     : FOR    ${num}    IN RANGE    1    ${node_range}+1
-    \    ${ip} =    Sxp.Get Ip From Number    ${num}
+    \    ${node} =    Sxp.Get Ip From Number    ${num}
     \    ${rnd_retry_time} =    BuiltIn.Evaluate    random.randint(1, 10)    modules=random
-    \    Add Node    ${ip}    retry_open_timer=${rnd_retry_time}
-    \    BuiltIn.Wait Until Keyword Succeeds    20    1    Check Node Started    ${ip}
+    \    Add Node    ${node}    retry_open_timer=${rnd_retry_time}
+    \    BuiltIn.Wait Until Keyword Succeeds    20    1    Check Node Started    ${node}    system=${ODL_SYSTEM_IP}
 
 Check Node Started
     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
-    [Documentation]    Verify that SxpNode has data writed to Operational datastore
+    [Documentation]    Verify that SxpNode has data writen to Operational datastore and is running
     ${resp} =    RequestsLibrary.Get Request    ${session}    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
     ${rc} =    Utils.Run Command On Remote System    ${system}    netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1    ${ODL_SYSTEM_USER}    ${ODL_SYSTEM_PASSWORD}    prompt=${ODL_SYSTEM_PROMPT}
@@ -338,6 +338,7 @@ Put Routing Configuration To Controller
     [Arguments]    ${data}    ${session}
     [Documentation]    Put Routing configuration to Config DS
     ${resp} =    RequestsLibrary.Put Request    ${session}    /restconf/config/sxp-cluster-route:sxp-cluster-route/    data=${data}    headers=${HEADERS_XML}
+    BuiltIn.Log    ${resp}
     BuiltIn.Should Match    "${resp.status_code}"    "20?"
 
 Clean Routing Configuration To Controller