X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Ftopoprocessing%2Fbasic-topology-operations%2F040_Filtration_links.robot;fp=csit%2Fsuites%2Ftopoprocessing%2Fbasic-topology-operations%2F040_Filtration_links.robot;h=9717bcc19fa930b01d6f9f349e0f944dc755fe50;hb=885ab79b11b017e8e9039530afcb9ad8e214fb98;hp=acf1f995bea76baebbecfb9874e47422d25e5afe;hpb=d11f5895faa57e1fa84e5b3cb92ed9aabe62229b;p=integration%2Ftest.git diff --git a/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot b/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot index acf1f995be..9717bcc19f 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot @@ -1,94 +1,171 @@ *** Settings *** -Documentation Test suite to verify fitration operation on different models. -... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL. -... Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot. -... Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational xmls and verify output. -... Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls. -Suite Setup Setup Environment -Suite Teardown Clean Environment -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Teardown Delete Overlay Topology -Library RequestsLibrary -Library SSHLibrary -Library XML -Variables ../../../variables/topoprocessing/TopologyRequests.py -Variables ../../../variables/topoprocessing/TargetFields.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/TopoprocessingKeywords.robot +Documentation Test suite to verify fitration operation on different models. +... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL. +... Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot. +... Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational xmls and verify output. +... Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls. + +Library RequestsLibrary +Library SSHLibrary +Library XML +Variables ../../../variables/topoprocessing/TopologyRequests.py +Variables ../../../variables/topoprocessing/TargetFields.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/TopoprocessingKeywords.robot + +Suite Setup Setup Environment +Suite Teardown Clean Environment +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing +Test Teardown Delete Overlay Topology + *** Test Cases *** Filtration Range Number Network Topology Model [Documentation] Test of range number type of filtration operation on Network Topology model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... network-topology-model + ... link + ... network-topo:1 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC} ${request} Set Range Number Filter ${request} 11 13 Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=3 + ... link-ref_count=3 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4 Filtration Range Number Inventory Model [Documentation] Test of range number type of filtration operation on Inventory model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... opendaylight-inventory-model + ... link + ... openflow-topo:3 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC} ${request} Set Range Number Filter ${request} 14 15 Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=2 + ... link-ref_count=2 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13 Filtration Specific String Network Topology Model [Documentation] Test of specific string type of filtration operation on Network Topology model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... network-topology-model + ... link + ... network-topo:1 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${IGP_LINK_NAME} ${request} Set Specific String Filter ${request} linkA Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=2 + ... link-ref_count=2 Check Filtered Links In Topology ${resp.content} link:1:4 link:1:2-1 Filtration Specific String Inventory Model [Documentation] Test of specific string type of filtration operation on Inventory model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... opendaylight-inventory-model + ... link + ... openflow-topo:3 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${IGP_LINK_NAME} ${request} Set Specific String Filter ${request} linkD Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=1 link-ref_count=1 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=1 + ... link-ref_count=1 Check Filtered Links In Topology ${resp.content} link:15:13 Filtration Range String Network Topology Model [Documentation] Test of range string type of filtration operation on Network Topology model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... network-topology-model + ... link + ... network-topo:1 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${IGP_LINK_NAME} ${request} Set Range String Filter ${request} linkA linkB Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=3 + ... link-ref_count=3 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4 Filtration Range String Inventory Model [Documentation] Test of range string type of filtration operation on Inventory model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... opendaylight-inventory-model + ... link + ... openflow-topo:3 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${IGP_LINK_NAME} ${request} Set Range String Filter ${request} linkC linkD Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=2 + ... link-ref_count=2 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13 Filtration Script Network Topology Model [Documentation] Test of script type of filtration operation on Network Topology model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... network-topology-model + ... link + ... network-topo:1 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${IGP_LINK_NAME} - ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} + ${script} Set Variable + ... if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=2 + ... link-ref_count=2 Check Filtered Links In Topology ${resp.content} link:1:2-2 link:1:3 Filtration Script Inventory Model [Documentation] Test of script type of filtration operation on Inventory model - ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3 + ${request} Prepare Filtration Topology Request + ... ${FILTRATION_NT} + ... opendaylight-inventory-model + ... link + ... openflow-topo:3 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${IGP_LINK_NAME} - ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} + ${script} Set Variable + ... if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} Basic Request Put ${request} ${OVERLAY_TOPO_URL} - ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3 + ${resp} Wait Until Keyword Succeeds + ... 3x + ... 1s + ... Output Topo Should Be Complete + ... link_count=3 + ... link-ref_count=3 Check Filtered Links In Topology ${resp.content} link:11:12 link:14:12 link:15:13