SXP: Fix localhost nodes start checks 97/76297/2
authorIvan Hrasko <ihrasko@cisco.com>
Thu, 20 Sep 2018 08:18:19 +0000 (10:18 +0200)
committerIvan Hrasko <ihrasko@cisco.com>
Thu, 20 Sep 2018 08:25:25 +0000 (10:25 +0200)
- localhost nodes 127.0.0.1, 127.0.0.2 etc.
are created on ${ODL_SYSTEM_IP} maschine

- but in general node with some ip should be
created on system with that ip, thus default:
${system}=${node}

Change-Id: I62489b87563c9b5b84f61c4f853a2787af2e6c8f
Signed-off-by: Ivan Hrasko <ihrasko@cisco.com>
csit/libraries/SxpLib.robot

index 6bb5b971337314b492a4a124cd9ae35b6b2eb75b..be7b43ba7424a9a29577cf5f65197a298572038e 100644 (file)
@@ -303,13 +303,13 @@ 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}