Cleanup unsupported releases from CompareStream
[integration/test.git] / csit / libraries / SxpLib.robot
index 6f4d5c977fa08c4ea61bddf7f1d9c56d05743387..7b7c3f921217a4058365ee21d0441009d23a42c4 100644 (file)
@@ -31,10 +31,10 @@ Post To Controller
 
 Add Node
     [Arguments]    ${node}    ${password}=${EMPTY}    ${version}=version4    ${port}=64999    ${session}=session    ${ip}=${EMPTY}
-    ...    ${ssl_stores}=${EMPTY}
+    ...    ${ssl_stores}=${EMPTY}    ${retry_open_timer}=1
     [Documentation]    Add node via RPC to ODL
     ${DATA}    Add Node Xml    ${node}    ${port}    ${password}    ${version}    ${ip}
-    ...    keystores=${ssl_stores}
+    ...    keystores=${ssl_stores}    retry_open_timer=${retry_open_timer}
     Post To Controller    ${session}    add-node    ${DATA}
 
 Delete Node
@@ -233,6 +233,30 @@ Should Not Contain Connection
     ...    ${state}
     Should Not Be True    ${out}    Shouldn't have ${ip}:${port} ${mode} ${version}
 
+Bindings Should Contain
+    [Arguments]    ${sgt}    ${prefix}    ${db_source}=any
+    [Documentation]    Retrieves bindings and verifies they contain given binding
+    ${resp}    Get Bindings
+    Should Contain Binding    ${resp}    ${sgt}    ${prefix}    ${db_source}
+
+Bindings Should Not Contain
+    [Arguments]    ${sgt}    ${prefix}    ${db_source}=any
+    [Documentation]    Retrieves bindings and verifies they do not contain given binding
+    ${resp}    Get Bindings
+    Should Not Contain Binding    ${resp}    ${sgt}    ${prefix}    ${db_source}
+
+Connections Should Contain
+    [Arguments]    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
+    [Documentation]    Retrieves connections and verifies they contain given connection
+    ${resp}    Get Connections
+    Should Contain Connection    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}
+
+Connections Should Not Contain
+    [Arguments]    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
+    [Documentation]    Retrieves connections and verifies they do not contain given connection
+    ${resp}    Get Connections
+    Should Not Contain Connection    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}
+
 Setup Topology Complex
     [Arguments]    ${version}=version4    ${PASSWORD}=none
     : FOR    ${node}    IN RANGE    2    6
@@ -335,7 +359,8 @@ Setup SXP Environment
     Setup SXP Session
     : FOR    ${num}    IN RANGE    1    ${node_range}
     \    ${ip}    Get Ip From Number    ${num}
-    \    CompareStream.Run_Keyword_If_At_Least_Boron    Add Node    ${ip}
+    \    ${rnd_retry_time} =    Evaluate    random.randint(1, 10)    modules=random
+    \    CompareStream.Run_Keyword_If_At_Least_Boron    Add Node    ${ip}    retry_open_timer=${rnd_retry_time}
     \    CompareStream.Run_Keyword_If_At_Least_Boron    Wait Until Keyword Succeeds    20    1    Check Node Started    ${ip}
 
 Check Node Started