Added check to verify that configuration of SXP was pushed into into ODL. 58/42958/16 release/beryllium-sr3
authorMartin Mihálek <mamihale@cisco.com>
Tue, 2 Aug 2016 11:12:16 +0000 (13:12 +0200)
committerVratko Polák <vrpolak@cisco.com>
Fri, 5 Aug 2016 09:41:46 +0000 (09:41 +0000)
Change-Id: Ie4df14964310a4cfd4a69c2d9528c4f5541f0ebf
Signed-off-by: Martin Mihálek <mamihale@cisco.com>
csit/libraries/SxpLib.robot

index bcfb0960621611618de19c82ec60a8aaaf34b72f..1462c516856c12b3a6ad045996132164264cd9cc 100644 (file)
@@ -226,10 +226,16 @@ Setup Topology Complex
     Add Binding    10    10.10.0.0/16    127.0.0.1
     Add Binding    10    10.0.0.0/8    127.0.0.1
 
+Verify Snapshot Was Pushed
+    [Arguments]    ${snapshot_string}=22-sxp-controller-one-node.xml
+    [Documentation]    Will succeed if the ${snapshot_string} is found in the karaf logs
+    ${output}    Run Command On Controller    ${ODL_SYSTEM_IP}    cat ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log* | grep -c 'Successfully pushed configuration snapshot.*${snapshot_string}'
+    Should Not Be Equal As Strings    ${output}    0
+
 Setup SXP Session
     [Documentation]    Create session to Controller
     Verify Feature Is Installed    odl-sxp-controller
-    Wait Until Keyword Succeeds    20    10    Check Karaf Log Has Messages    Successfully pushed configuration snapshot 22-sxp-controller-one-node.xml
+    Wait Until Keyword Succeeds    20    10    Verify Snapshot Was Pushed
     Create Session    session    url=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
     ${resp}    RequestsLibrary.Get Request    session    ${MODULES_API}
     Should Be Equal As Strings    ${resp.status_code}    200