From: Martin Dindoffer Date: Wed, 20 Jul 2016 11:42:58 +0000 (+0200) Subject: Topoprocessing - Rework the output requesting mechanism X-Git-Tag: release/beryllium-sr3~13 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=395709912c21508c55310157e864bfb812099dd6;p=integration%2Ftest.git Topoprocessing - Rework the output requesting mechanism * This change proposes a unified approach to assert receiving a full output topology. It consists of a simple Wait Until Keyword Succeeds call, that postpones the actual content of test cases until a full output topology has been retrieved from the restconf. * This also removes the redundant definitions of Overlay Topology URL into one variable. Change-Id: I35921b92b3ca188c664058bd7c9fd715bf2a20a3 Signed-off-by: Martin Dindoffer --- diff --git a/csit/libraries/TopoprocessingKeywords.robot b/csit/libraries/TopoprocessingKeywords.robot index 9fe3910d15..18dfe00a4c 100644 --- a/csit/libraries/TopoprocessingKeywords.robot +++ b/csit/libraries/TopoprocessingKeywords.robot @@ -12,6 +12,8 @@ Resource Utils.robot ${CONFIGURATION_XML} ${CURDIR}/../suites/topoprocessing/configuration.xml ${OPERATIONAL_XML} ${CURDIR}/../suites/topoprocessing/operational.xml ${REMOTE_FILE} ${WORKSPACE}/${BUNDLEFOLDER}/etc/opendaylight/karaf/80-topoprocessing-config.xml +${OUTPUT_TOPO_NAME} topo:1 +${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/${OUTPUT_TOPO_NAME} *** Keywords *** Basic Request Put @@ -23,13 +25,6 @@ Basic Request Put Wait For Karaf Log Correlation configuration successfully read Wait For Karaf Log Transaction successfully written -Basic Request Get And Test - [Arguments] ${overlay_topology_url} ${should_contain} ${times} - [Documentation] Send a simple HTTP GET request to a given URL and test if response contains the expected item X times - ${resp} Basic Request Get ${overlay_topology_url} - Should Contain X Times ${resp.content} ${should_contain} ${times} - [Return] ${resp} - Basic Request Get [Arguments] ${overlay_topology_url} [Documentation] Send a simple HTTP GET request to a given URL @@ -37,15 +32,6 @@ Basic Request Get Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp} -Send Basic Request And Test If Contain X Times - [Arguments] ${request} ${overlay_topology_url} ${should_contain} ${times} - [Documentation] Send a basic HTTP PUT request to a given URL and test if response contains the expexted item X times - Basic Request Put ${request} ${overlay_topology_url} - ${resp} Wait Until Keyword Succeeds 40x 250ms Basic Request Get And Test ${overlay_topology_url} ${should_contain} - ... ${times} - Log ${resp.content} - [Return] ${resp} - Send Basic Delete Request [Arguments] ${url} [Documentation] Sends a HTTP/DELETE request to a given URL @@ -56,7 +42,7 @@ Send Basic Delete Request Delete Underlay Node [Arguments] ${topology-id} ${node-id} [Documentation] Deletes a node from an underlay topology - ${resp} Send Basic Delete Request network-topology:network-topology/topology/${topology-id}/node/${node-id} + ${resp} Send Basic Delete Request ${TOPOLOGY_URL}/${topology-id}/node/${node-id} [Return] ${resp} Setup Environment @@ -87,17 +73,23 @@ Clean Environment Delete All Sessions Delete Overlay Topology - [Arguments] ${overlay_topology} [Documentation] Delete overlay topologies from datastore + Run Keyword If Test Failed Print Output Topo Log ---- Test Teardown ---- - Log Deleting overlay topology from ${CONFIG_API}/${overlay_topology} - ${resp} Delete Request session ${CONFIG_API}/${overlay_topology} + Log Deleting overlay topology from ${CONFIG_API}/${OVERLAY_TOPO_URL} + ${resp} Delete Request session ${CONFIG_API}/${OVERLAY_TOPO_URL} Should Be Equal As Strings ${resp.status_code} 200 +Print Output Topo + [Documentation] Waits a while to allow any hanging transactions to finnish and then logs the output topology + Log ---- Output Topo Dump After Cooldown---- + Sleep 2s + ${resp} Wait Until Keyword Succeeds 5x 250ms Basic Request Get ${OVERLAY_TOPO_URL} + Log ${resp.content} + Refresh Underlay Topologies And Delete Overlay Topology - [Arguments] ${overlay_topology} [Documentation] Deletes given overlay topology from datastore and overwrites the underlaying ones with initial topologies - Delete Overlay Topology ${overlay_topology} + Delete Overlay Topology Insert Underlay Topologies Prepare New Feature Installation @@ -401,10 +393,6 @@ Check Aggregated Termination Point in Node Check Filtered Nodes in Topology [Arguments] ${topology} ${tp_count} @{node_ids} [Documentation] Checks nodes in filtered topology - ${node_count} Get Length ${node_ids} - Should Contain X Times ${topology} ${node_count} - Should Contain X Times ${topology} ${node_count} - Should Contain X Times ${topology} ${tp_count} : FOR ${node_id} IN @{node_ids} \ Element Text Should Be ${topology} ${node_id} xpath=.//node/supporting-node[node-ref='${node_id}']/node-ref @@ -422,9 +410,6 @@ Check Filtered Termination Points in Node Check Filtered Links In Topology [Arguments] ${topology} @{supp_link_ids} [Documentation] Checks links in filtered topology - ${supp_link_count} Get Length ${supp_link_ids} - Should Contain X Times ${topology} ${supp_link_count} - Should Contain X Times ${topology} ${supp_link_count} : FOR ${supp_link_id} IN @{supp_link_ids} \ Should Contain X Times ${topology} ${supp_link_id} 1 @@ -436,3 +421,19 @@ Check Overlay Link Source And Destination ${link_destination} Get Element Text ${link} xpath=.//dest-node Should Be Equal As Strings ${link_source} ${expected_source} Should Be Equal As Strings ${link_destination} ${expected_destination} + +Output Topo Should Be Complete + [Documentation] Verifies that the output topology contains the expected amount of essential elements + [Arguments] ${node_count}=-1 ${supporting-node_count}=-1 ${node-ref_count}=-1 ${tp_count}=-1 ${tp-ref_count}=-1 ${link_count}=-1 ${link-ref_count}=-1 + ${resp} Wait Until Keyword Succeeds 5x 250ms Basic Request Get ${OVERLAY_TOPO_URL} + Should Contain ${resp.content} ${OUTPUT_TOPO_NAME} + Run Keyword If ${node_count}>-1 Should Contain X Times ${resp.content} ${node_count} + Run Keyword If ${supporting-node_count}>-1 Should Contain X Times ${resp.content} ${supporting-node_count} + Run Keyword If ${node-ref_count}>-1 Should Contain X Times ${resp.content} ${node-ref_count} + Run Keyword If ${link_count}>-1 Should Contain X Times ${resp.content} ${link_count} + Run Keyword If ${link-ref_count}>-1 Should Contain X Times ${resp.content} ${link-ref_count} + Run Keyword If ${tp_count}>-1 Should Contain X Times ${resp.content} ${tp_count} + Run Keyword If ${tp-ref_count}>-1 Should Contain X Times ${resp.content} ${tp-ref_count} + Log ---- Output Topo ---- + Log ${resp.content} + [Return] ${resp} diff --git a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot index 8ca73335d5..7859078a25 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify unification operation on different models ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,9 +17,6 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Unification Node [Documentation] Test unification operation on Network Topology model @@ -27,11 +24,8 @@ Unification Node ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 8 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 10 - Should Contain X Times ${resp.content} 14 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10 tp_count=14 tp-ref_count=14 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:5 bgp:10 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8 @@ -47,11 +41,8 @@ Unification Node Inventory ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 7 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 10 - Should Contain X Times ${resp.content} 12 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10 tp_count=12 tp-ref_count=12 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:10 of-node:4 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8 @@ -67,11 +58,8 @@ Unification Scripting Node ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 9 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 10 - Should Contain X Times ${resp.content} 14 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=9 supporting-node_count=10 tp_count=14 tp-ref_count=14 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:10 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8 @@ -89,11 +77,8 @@ Unification Scripting Node Inventory ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 9 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 10 - Should Contain X Times ${resp.content} 12 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=9 supporting-node_count=10 tp_count=12 tp-ref_count=12 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:9 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2 of-node:8 @@ -109,11 +94,8 @@ Unification Node Inside ${model} Set Variable network-topology-model ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node network-topo:1 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 5 - Should Contain X Times ${resp.content} 8 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5 tp_count=8 tp-ref_count=8 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2 @@ -124,11 +106,8 @@ Unification Node Inside Inventory ${model} Set Variable opendaylight-inventory-model ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node openflow-topo:2 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 5 - Should Contain X Times ${resp.content} 0 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5 tp_count=0 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8 @@ -139,11 +118,8 @@ Unification Termination Point Inside ${model} Set Variable network-topology-model ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} termination-point network-topo:1 ${request} Insert Target Field ${request} 0 ${OVSDB_OFPORT} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 5 - Should Contain X Times ${resp.content} 8 - Should Contain X Times ${resp.content} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 5 - Should Contain X Times ${resp.content} 12 - Should Contain X Times ${resp.content} 8 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 tp_count=8 tp-ref_count=12 ${topology_id} Set Variable openflow-topo:1 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:5 tp:5:1 tp:5:1 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:4 tp:4:1 tp:4:1 diff --git a/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot b/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot index b547e8749b..d040ffa474 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify fitration operation on different models. ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,17 +17,14 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Filtration IPV4 Network Topology Model [Documentation] Test of ipv4 type of filtration operation on Network Topology model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:1 ${request} Insert Filter ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4} ${request} Set IPV4 Filter ${request} 192.168.1.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=3 tp-ref_count=3 Check Filtered Nodes in Topology ${resp.content} 3 bgp:1 bgp:2 Filtration IPV4 Inventory Model @@ -35,8 +32,8 @@ Filtration IPV4 Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS} ${request} Set IPV4 Filter ${request} 192.168.1.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=8 tp-ref_count=8 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3 Filtration Range Number Network Topology Model @@ -44,8 +41,8 @@ Filtration Range Number Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OVS_VERSION} ${request} Set Range Number Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=5 tp-ref_count=5 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10 Filtration Range Number Inventory Model @@ -53,8 +50,8 @@ Filtration Range Number Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_SERIAL_NUMBER} ${request} Set Range Number Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10 Filtration Specific String Network Topology Model @@ -62,8 +59,8 @@ Filtration Specific String Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_OVS_VERSION} ${request} Set Specific String Filter ${request} 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 ${EMPTY} + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=2 tp-ref_count=2 Check Filtered Nodes in Topology ${resp.content} 2 bgp:9 bgp:10 Filtration Specific String Inventory Model @@ -71,8 +68,8 @@ Filtration Specific String Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER} ${request} Set Specific String Filter ${request} 21 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=0 tp-ref_count=0 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 Filtration Range String Network Topology Model @@ -80,8 +77,8 @@ Filtration Range String Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_OVS_VERSION} ${request} Set Range String Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=5 tp-ref_count=5 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10 Filtration Range String Inventory Model @@ -89,8 +86,8 @@ Filtration Range String Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER} ${request} Set Range String Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10 Filtration IPV6 Network Topology Model @@ -98,8 +95,8 @@ Filtration IPV6 Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:3 ${request} Insert Filter ${request} ${FILTER_IPV6} ${ISIS_NODE_TE_ROUTER_ID_IPV6} ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=1 tp-ref_count=1 Check Filtered Nodes in Topology ${resp.content} 1 bgp:11 bgp:12 Filtration IPV6 Inventory Model @@ -107,8 +104,8 @@ Filtration IPV6 Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:3 ${request} Insert Filter ${request} ${FILTER_IPV6} ${OPENFLOW_NODE_IP_ADDRESS} ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:201/120 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 Check Filtered Nodes in Topology ${resp.content} 0 of-node:12 of-node:14 of-node:15 Filtration Script Network Topology Model @@ -117,8 +114,8 @@ Filtration Script Network Topology Model ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${ISIS_NODE_TE_ROUTER_ID_IPV4} ${script} Set Variable if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=5 tp-ref_count=5 Check Filtered Nodes in Topology ${resp.content} 5 bgp:3 bgp:4 bgp:5 Filtration Script Inventory Model @@ -127,6 +124,6 @@ Filtration Script Inventory Model ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_IP_ADDRESS} ${script} Set Variable if (node.getValue().indexOf("192.168.2") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=8 tp-ref_count=8 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3 diff --git a/csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot b/csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot index 408719e4da..8e9b73ac6a 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify fitration operation on different models. ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,18 +17,14 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** 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 termination-point network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OFPORT} ${request} Set Range Number Filter ${request} 1115 1119 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:1 tp:7:2 Check Filtered Termination Points in Node ${resp.content} bgp:8 @@ -40,9 +36,8 @@ Filtration Range Number Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER} ${request} Set Range Number Filter ${request} 2 4 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 5 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=5 tp-ref_count=5 Check Filtered Termination Points in Node ${resp.content} of-node:1 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:3 tp:2:2 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2 @@ -54,9 +49,8 @@ Filtration Specific Number Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OVSDB_OFPORT} ${request} Set Specific Number Filter ${request} 1119 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=1 tp-ref_count=1 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 @@ -71,9 +65,8 @@ Filtration Specific Number Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OPENFLOW_NODE_CONNECTOR_MAXIMUM_SPEED} ${request} Set Specific Number Filter ${request} 2 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} of-node:1 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2 @@ -85,9 +78,8 @@ Filtration Specific String Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_TP_NAME} ${request} Set Specific String Filter ${request} portC - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=1 tp-ref_count=1 Check Filtered Termination Points in Node ${resp.content} bgp:6 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2 Check Filtered Termination Points in Node ${resp.content} bgp:8 @@ -99,8 +91,8 @@ Filtration Specific String Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME} ${request} Set Specific String Filter ${request} portB - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 2 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=2 tp-ref_count=2 Check Filtered Termination Points in Node ${resp.content} of-node:1 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1 Check Filtered Termination Points in Node ${resp.content} of-node:3 @@ -112,9 +104,8 @@ Filtration Range String Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_TP_NAME} ${request} Set Range String Filter ${request} portA portC - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 ${EMPTY} - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2 Check Filtered Termination Points in Node ${resp.content} bgp:8 @@ -126,8 +117,8 @@ Filtration Range String Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME} ${request} Set Range String Filter ${request} portA portB - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} of-node:1 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1 tp:2:3 Check Filtered Termination Points in Node ${resp.content} of-node:3 @@ -140,9 +131,8 @@ Filtration Script Network Topology Model ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OVSDB_OFPORT} ${script} Set Variable if (node.getValue() > 1117 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} bgp:1 Check Filtered Termination Points in Node ${resp.content} bgp:2 Check Filtered Termination Points in Node ${resp.content} bgp:3 @@ -155,11 +145,10 @@ Filtration Script Inventory Model ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_CONNECTOR_NAME} ${script} Set Variable if (node.getValue().indexOf("portB") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Filtered Termination Points in Node ${resp.content} of-node:1 tp:1:1 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2 tp:2:3 Check Filtered Termination Points in Node ${resp.content} of-node:3 Check Filtered Termination Points in Node ${resp.content} of-node:4 - Check Filtered Termination Points in Node ${resp.content} of-node:5 + Check Filtered Termination Points in Node ${resp.content} of-node:5 \ No newline at end of file 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 4f25346e69..e1edf636ff 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify fitration operation on different models. ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,17 +17,14 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** 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} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC} ${request} Set Range Number Filter ${request} 11 13 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 3 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4 Filtration Range Number Inventory Model @@ -35,8 +32,8 @@ Filtration Range Number Inventory Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 2 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13 Filtration Specific String Network Topology Model @@ -44,8 +41,8 @@ Filtration Specific String Network Topology Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 2 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:1:4 link:1:2-1 Filtration Specific String Inventory Model @@ -53,8 +50,8 @@ Filtration Specific String Inventory Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 1 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:15:13 Filtration Range String Network Topology Model @@ -62,8 +59,8 @@ Filtration Range String Network Topology Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 3 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4 Filtration Range String Inventory Model @@ -71,8 +68,8 @@ Filtration Range String Inventory Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 2 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13 Filtration Script Network Topology Model @@ -81,8 +78,8 @@ Filtration Script Network Topology Model ${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);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 2 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:1:2-2 link:1:3 Filtration Script Inventory Model @@ -91,6 +88,6 @@ Filtration Script Inventory Model ${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);} ${request} Set Script Filter ${request} javascript ${script} - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 3 - Should Contain ${resp.content} topo:1 + 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 Check Filtered Links In Topology ${resp.content} link:11:12 link:14:12 link:15:13 diff --git a/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot b/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot index d1ae92b7b6..ddd51ea15a 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify fitration operation on different models. ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,9 +17,6 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Unification Filtration Node Inside Network Topology model [Documentation] Test unification filtration inside operation on Network Topology model @@ -28,9 +25,8 @@ Unification Filtration Node Inside Network Topology model ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4} 1 ${request} Insert Apply Filters ${request} 1 1 ${request} Set IPV4 Filter ${request} 192.168.2.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:20 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:19 @@ -41,9 +37,8 @@ Unification Filtration Node Inside Inventory model ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS} 1 ${request} Insert Apply Filters ${request} 1 1 ${request} Set IPV4 Filter ${request} 192.168.2.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 4 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 tp_count=0 tp-ref_count=0 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:18 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:17 of-node:19 of-node:20 @@ -54,9 +49,8 @@ Unification Filtration Termination Point Inside Network Topology model ${request} Insert Filter With ID ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_TP_NAME} 1 ${request} Insert Apply Filters ${request} 1 1 ${request} Set Specific String Filter ${request} portA - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=6 ${topology_id} Set Variable network-topo:5 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:21 tp:21:1 tp:21:1 ... tp:21:2 tp:21:3 @@ -74,11 +68,8 @@ Unification Filtration Node Network Topology model ${request} Insert Apply Filters ${request} 1 1 ${request} Insert Apply Filters ${request} 2 1 ${request} Set IPV4 Filter ${request} 192.168.1.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 4 - Should Contain X Times ${resp.content} 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 tp_count=3 tp-ref_count=3 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1 bgp:16 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2 bgp:17 @@ -91,10 +82,7 @@ Unification Filtration Node Inventory model ${request} Insert Apply Filters ${request} 1 1 ${request} Insert Apply Filters ${request} 2 1 ${request} Set IPV4 Filter ${request} 192.168.1.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 - Should Contain X Times ${resp.content} 0 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:28 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:16 of-node:26 diff --git a/csit/suites/topoprocessing/basic-topology-operations/060_Link_computation.robot b/csit/suites/topoprocessing/basic-topology-operations/060_Link_computation.robot index d37d0b62d7..3136b2e3ad 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/060_Link_computation.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/060_Link_computation.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify link computation operation on different m ... 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 Teardown Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,9 +17,6 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Link Computation Aggregation Inside [Documentation] Test of link computation with unification inside on Network Topology model @@ -27,9 +24,8 @@ Link Computation Aggregation Inside ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node network-topo:6 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Link Computation Inside ${request} ${LINK_COMPUTATION_INSIDE} n:network-topology-model network-topo:6 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 4 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5 node-ref_count=5 link_count=4 link-ref_count=4 ${overlay_node_id_28_29} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:28 bgp:29 ${overlay_node_id_26} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:26 ${overlay_node_id_30} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:30 @@ -47,9 +43,8 @@ Link Computation Filtration ${request} Insert Filter ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4} ${request} Set IPV4 Filter ${request} 192.168.2.1/32 ${request} Insert Link Computation Inside ${request} ${LINK_COMPUTATION_INSIDE} n:network-topology-model network-topo:6 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 link_count=1 link-ref_count=1 ${overlay_node_id_28} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:28 ${overlay_node_id_29} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:29 Check Overlay Link Source And Destination ${model} ${resp.content} network-topo:6 link:28:29 ${overlay_node_id_28} ${overlay_node_id_29} @@ -65,9 +60,8 @@ Link Computation Aggregation Filtration ${request} Insert Apply Filters ${request} 2 1 ${request} Set IPV4 Filter ${request} 192.168.1.1/24 ${request} Insert Link Computation ${request} ${LINK_COMPUTATION} n:network-topology-model network-topo:6 network-topo:1 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 2 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 link_count=2 link-ref_count=2 ${overlay_node_id_1_26} Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:26 bgp:1 ${overlay_node_id_2_27} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:27 bgp:2 ${topology_id} Set Variable network-topo:1 diff --git a/csit/suites/topoprocessing/basic-topology-operations/070_Underlay_update.robot b/csit/suites/topoprocessing/basic-topology-operations/070_Underlay_update.robot index 7e7db158d1..3af5826dbd 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/070_Underlay_update.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/070_Underlay_update.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify update behaviour during different topopro ... 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 Teardown Refresh Underlay Topologies And Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Refresh Underlay Topologies And Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,9 +17,6 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Unification Node Update [Documentation] Test processing of updates using unification operation on Network Topology model @@ -28,18 +25,19 @@ Unification Node Update ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 8 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10 tp_count=14 tp-ref_count=14 #Update a node, expecting a unification of two nodes into one ${node} Create Isis Node bgp:1 router-id-ipv4=192.168.1.2 Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:1 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 7 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10 tp_count=11 tp-ref_count=11 : FOR ${index} IN RANGE 1 11 \ Should Contain X Times ${resp.content} bgp:${index} 1 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2 bgp:1 #Update a unified node, expecting creation of a new overlay node ${node} Create Isis Node bgp:3 router-id-ipv4=192.168.3.1 Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:3 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 8 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10 tp_count=9 tp-ref_count=9 : FOR ${index} IN RANGE 1 11 \ Should Contain X Times ${resp.content} bgp:${index} 1 @@ -49,18 +47,19 @@ Unification Node Inventory ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 7 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10 tp_count=12 tp-ref_count=12 #Update a node, expecting unification of two nodes into one ${node} Create Openflow Node openflow:2 192.168.1.1 Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:2 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 6 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=6 supporting-node_count=10 tp_count=12 tp-ref_count=12 : FOR ${index} IN RANGE 1 11 \ Should Contain X Times ${resp.content} of-node:${index} 1 Check Aggregated Node in Topology ${model} ${resp.content} 5 of-node:2 of-node:6 of-node:1 #Update a unified node, expecting creation of a new overlay node ${node} Create Openflow Node openflow:4 192.168.3.1 Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:4 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 7 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10 tp_count=12 tp-ref_count=12 : FOR ${index} IN RANGE 1 11 \ Should Contain X Times ${resp.content} of-node:${index} 1 @@ -69,14 +68,13 @@ Filtration Range Number Node Update Network Topology Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} ${model} node network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OVS_VERSION} ${request} Set Range Number Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=5 tp-ref_count=5 ${request} Create Isis Node bgp:7 17 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} - Should Contain ${resp.content} topo:1 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=3 tp-ref_count=3 : FOR ${index} IN RANGE 8 11 \ Should Contain X Times ${resp.content} bgp:${index} 1 - Should Contain X Times ${resp.content} 3 Should Not Contain ${resp.content} bgp:7 ${topology_id} Set Variable network-topo:2 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:8 tp:8:1 tp:8:1 @@ -84,12 +82,12 @@ Filtration Range Number Node Update Network Topology Model Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:10 tp:10:1 tp:10:1 ${request} Create Isis Node bgp:7 23 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=3 tp-ref_count=3 ${request} Create OVSDB Termination Point tp:7:1 1119 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=4 tp-ref_count=4 : FOR ${index} IN RANGE 7 11 \ Should Contain X Times ${resp.content} bgp:${index} 1 - Should Contain X Times ${resp.content} 4 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:7 tp:7:1 tp:7:1 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:8 tp:8:1 tp:8:1 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:9 tp:9:1 tp:9:1 @@ -99,16 +97,18 @@ Filtration Range Number Node Update Inventory Model ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_SERIAL_NUMBER} ${request} Set Range Number Filter ${request} 20 25 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 3 - Should Contain ${resp.content} topo:1 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 + #Update a Node so it passes filtration ${request} Create Openflow Node openflow:7 192.168.2.3 23 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 7 11 \ Should Contain X Times ${resp.content} of-node:${index} 1 + #Update a Node so it is filtered out ${request} Create Openflow Node openflow:7 192.168.2.3 17 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 8 11 \ Should Contain X Times ${resp.content} of-node:${index} 1 Should Not Contain ${resp.content} of-node:7 @@ -119,18 +119,17 @@ Filtration Range Number Termination Point Update NT ${request} Prepare Filtration Topology Request ${FILTRATION_NT} ${model} termination-point network-topo:2 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OFPORT} ${request} Set Range Number Filter ${request} 1115 1119 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 #Update a previously out-of-range termination point, so it passes filtration ${terminationPoint} Create OVSDB Termination Point tp:8:1 1115 Basic Request Put ${terminationPoint} network-topology:network-topology/topology/network-topo:2/node/bgp:8/termination-point/tp:8:1 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 4 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=4 tp-ref_count=4 Check Aggregated Termination Point in Node ${model} ${resp.content} network-topo:2 bgp:8 tp:8:1 tp:8:1 #Update a previsouly in-range termination point, so it is filtered out ${terminationPoint} Create OVSDB Termination Point tp:7:2 1110 Basic Request Put ${terminationPoint} network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 3 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=3 tp-ref_count=3 Check Aggregated Termination Point in Node ${model} ${resp.content} network-topo:2 bgp:7 tp:7:1 tp:7:1 Filtration Range Number Termination Point Update Inventory @@ -139,21 +138,19 @@ Filtration Range Number Termination Point Update Inventory ${request} Prepare Filtration Topology Request ${FILTRATION_NT} ${model} termination-point openflow-topo:1 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER} ${request} Set Range Number Filter ${request} 2 4 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 5 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=5 tp-ref_count=5 #Update a previously out-of-range termination point, so it passes filtration ${nodeConnector} Create Openflow Node Connector openflow:2:1 3 Basic Request Put ${nodeConnector} opendaylight-inventory:nodes/node/openflow:2/node-connector/openflow:2:1 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 6 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=6 tp-ref_count=6 Check Aggregated Termination Point in Node ${model} ${resp.content} openflow-topo:1 of-node:2 tp:2:1 tp:2:1 Check Aggregated Termination Point in Node ${model} ${resp.content} openflow-topo:1 of-node:2 tp:2:2 tp:2:2 Check Aggregated Termination Point in Node ${model} ${resp.content} openflow-topo:1 of-node:2 tp:2:3 tp:2:3 #Update an in-range termination point, so it is filtered out ${nodeConnector} Create Openflow Node Connector openflow:3:2 5 Basic Request Put ${nodeConnector} opendaylight-inventory:nodes/node/openflow:3/node-connector/openflow:3:2 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} node: 5 - Should Contain X Times ${resp.content} 5 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 tp_count=5 tp-ref_count=5 Check Aggregated Termination Point in Node ${model} ${resp.content} openflow-topo:1 of-node:3 tp:3:1 tp:3:1 Filtration Range Number Link Update Network Topology Model @@ -161,19 +158,19 @@ Filtration Range Number Link Update Network Topology Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 3 - Should Contain ${resp.content} topo:1 + 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 #Filter a link out ${request} Create Link link:1:4 bgp:1 bgp:4 linkA 15 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:1/link/link:1:4 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} 2 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 Should Contain X Times ${resp.content} /network-topology/topology/network-topo:1/link/link:1:3 1 Should Contain X Times ${resp.content} /network-topology/topology/network-topo:1/link/link:1:2-1 1 Should Not Contain ${resp.content} network-topology/topology/network-topo:1/link/link:1:4 #Put the link back in ${request} Create Link link:1:4 bgp:1 bgp:4 linkA 12 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:1/link/link:1:4 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} 3 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3 Should Contain X Times ${resp.content} /network-topology/topology/network-topo:1/link/link:1:4 1 Should Contain X Times ${resp.content} /network-topology/topology/network-topo:1/link/link:1:3 1 Should Contain X Times ${resp.content} /network-topology/topology/network-topo:1/link/link:1:2-1 1 @@ -183,17 +180,17 @@ Filtration Range Number Link Update Inventory Model ${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 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} link: 2 - Should Contain ${resp.content} topo:1 + 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 ${request} Create Link link:11:12 of-node:11 of-node:12 linkB 14 Basic Request Put ${request} network-topology:network-topology/topology/openflow-topo:3/link/link:11:12 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} 3 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3 Should Contain X Times ${resp.content} /network-topology/topology/openflow-topo:3/link/link:14:12 1 Should Contain X Times ${resp.content} /network-topology/topology/openflow-topo:3/link/link:15:13 1 Should Contain X Times ${resp.content} /network-topology/topology/openflow-topo:3/link/link:11:12 1 ${request} Create Link link:11:12 of-node:11 of-node:12 linkB 13 Basic Request Put ${request} network-topology:network-topology/topology/openflow-topo:3/link/link:11:12 - ${resp} Basic Request Get And Test ${OVERLAY_TOPO_URL} 2 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2 Should Contain X Times ${resp.content} /network-topology/topology/openflow-topo:3/link/link:14:12 1 Should Contain X Times ${resp.content} /network-topology/topology/openflow-topo:3/link/link:15:13 1 @@ -203,18 +200,17 @@ Unification Filtration Node Update Inside Network Topology model ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4} 1 ${request} Insert Apply Filters ${request} 1 1 ${request} Set IPV4 Filter ${request} 192.168.2.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain ${resp.content} bgp: 3 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 ${request} Create Isis Node bgp:17 10 192.168.2.1 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 17 21 \ Should Contain X Times ${resp.content} bgp:${index} 1 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:17 bgp:20 ${request} Create Isis Node bgp:17 10 192.168.1.2 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 18 21 \ Should Contain X Times ${resp.content} bgp:${index} 1 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:20 @@ -225,14 +221,11 @@ Unification Filtration Node Update Inside Inventory model ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS} 1 ${request} Insert Apply Filters ${request} 1 1 ${request} Set IPV4 Filter ${request} 192.168.2.1/24 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 2 - Should Contain ${resp.content} topo:1 - Should Contain ${resp.content} of-node: 4 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 tp_count=0 tp-ref_count=0 ${request} Create Openflow Node openflow:17 192.168.1.2 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} - Should Contain ${resp.content} topo:1 - Should Contain ${resp.content} of-node: 3 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 18 21 \ Should Contain X Times ${resp.content} of-node:${index} 1 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:19']/.. @@ -243,7 +236,7 @@ Unification Filtration Node Update Inside Inventory model Should Not Contain ${node} of-node:17 ${request} Create Openflow Node openflow:17 192.168.2.3 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=4 node-ref_count=4 tp_count=0 tp-ref_count=0 : FOR ${index} IN RANGE 17 21 \ Should Contain X Times ${resp.content} of-node:${index} 1 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:17 of-node:19 of-node:20 @@ -254,13 +247,12 @@ Link Computation Aggregation Inside Update NT ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node network-topo:6 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Link Computation Inside ${request} ${LINK_COMPUTATION_INSIDE} n:network-topology-model network-topo:6 - ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 4 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5 node-ref_count=5 link_count=4 link-ref_count=4 #Divide double nodes from overlay topology ${request} Create Isis Node bgp:29 router-id-ipv4=192.168.1.3 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:6/node/bgp:29 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 4 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 link_count=4 link-ref_count=4 ${node_26} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:26 ${node_27} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:27 ${node_28} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:28 @@ -274,9 +266,7 @@ Link Computation Aggregation Inside Update NT #Update link to node out of topology ${request} Create Link link:28:29 bgp:28 bgp:31 linkB 11 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:6/link/link:28:29 - ${resp} Basic Request Get ${OVERLAY_TOPO_URL} - Should Contain ${resp.content} topo:1 - Should Contain X Times ${resp.content} 3 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5 node-ref_count=5 link_count=3 link-ref_count=3 #Refresh node IDs ${node_26} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:26 ${node_27} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:27 diff --git a/csit/suites/topoprocessing/basic-topology-operations/080_Underlay_item_removal.robot b/csit/suites/topoprocessing/basic-topology-operations/080_Underlay_item_removal.robot index dfb0c0fbc5..490d71ffd3 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/080_Underlay_item_removal.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/080_Underlay_item_removal.robot @@ -6,7 +6,7 @@ Documentation Test suite to verify processing of removal requests on differe ... xmls and verify output. Topology-id on the end of each url 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 Teardown Refresh Underlay Topologies And Delete Overlay Topology ${OVERLAY_TOPO_URL} +Test Teardown Refresh Underlay Topologies And Delete Overlay Topology Library RequestsLibrary Library SSHLibrary Library XML @@ -17,9 +17,6 @@ Resource ../../../libraries/KarafKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/TopoprocessingKeywords.robot -*** Variables *** -${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1 - *** Test Cases *** Unification Node Removal NT [Documentation] Test processing of node removal using unification operation on Network Topology model @@ -28,15 +25,15 @@ Unification Node Removal NT ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node network-topo:1 network-topo:2 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0 - Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 8 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10 node-ref_count=10 #Remove an underlay aggregated node, preserving the overlay node Delete Underlay Node network-topo:1 bgp:3 - ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} - ... 9 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=9 node-ref_count=9 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:4 #Remove an underlay aggregated node, expecting removal of the overlay node Delete Underlay Node network-topo:1 bgp:4 - Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} 8 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=8 node-ref_count=8 Unification Node Removal Inventory [Documentation] Test processing of node removal using unification operation on Inventory model @@ -45,12 +42,12 @@ Unification Node Removal Inventory ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0 - Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} node: 7 + Basic Request Put ${request} ${OVERLAY_TOPO_URL} + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10 node-ref_count=10 #Remove an underlay aggregated node, preserving the overlay node Delete Underlay Node openflow-topo:2 of-node:6 - ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} - ... 9 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=9 node-ref_count=9 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:1 #Remove an underlay aggregated node, expecting removal of the overlay node Delete Underlay Node openflow-topo:1 of-node:1 - Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} 8 + ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=6 supporting-node_count=8 node-ref_count=8