From 39ee1426c6814d5d5a045d48a48600dae983530e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andrej=20Z=C3=A1=C5=88?= Date: Wed, 18 Nov 2015 13:12:38 +0100 Subject: [PATCH] Topoprocessing tests - Keywords reworked MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unification TP Inside Inventory test reworked. This patch should be submitted after this change https://git.opendaylight.org/gerrit/#/c/33854/ will be merged Change-Id: I1b4a1d17cb2bcc0a18475df4dc859d60b5088e7a Signed-off-by: Andrej Záň Signed-off-by: Branislav Janošík --- csit/libraries/KarafKeywords.robot | 7 - csit/libraries/TopoprocessingKeywords.robot | 173 +++- .../010_Aggregation.robot | 68 +- .../020_Filtration_nodes.robot | 231 ++++++ .../030_Filtration_termination_points.robot | 250 ++++++ .../040_Filtration_links.robot | 151 ++++ .../050_Aggregation_filtration.robot | 147 ++++ .../basic/010_Restconf_OK.robot | 2 +- .../010_Unifications_Tests.robot | 8 +- csit/variables/topoprocessing/Topologies.py | 782 ++++++++++++++++++ .../topoprocessing/TopologyRequests.py | 164 +++- 11 files changed, 1903 insertions(+), 80 deletions(-) create mode 100644 csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot create mode 100644 csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot create mode 100644 csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot create mode 100644 csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot diff --git a/csit/libraries/KarafKeywords.robot b/csit/libraries/KarafKeywords.robot index 4c3ff585cc..3a72696ea2 100644 --- a/csit/libraries/KarafKeywords.robot +++ b/csit/libraries/KarafKeywords.robot @@ -17,13 +17,6 @@ Verify Feature Is Installed Should Contain ${output} ${feature_name} [Return] ${output} -Verify Feature Is Not Installed - [Arguments] ${feature_name} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT} - [Documentation] Will Succeed if the given ${feature_name} is NOT found in the output of "feature:list -i" - ${output}= Issue Command On Karaf Console feature:list -i | grep ${feature_name} ${controller} ${karaf_port} - Should Not Contain ${output} ${feature_name} - [Return] ${output} - Issue Command On Karaf Console [Arguments] ${cmd} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT} ${timeout}=5 [Documentation] Will execute the given ${cmd} by ssh'ing to the karaf console running on ${ODL_SYSTEM_IP} diff --git a/csit/libraries/TopoprocessingKeywords.robot b/csit/libraries/TopoprocessingKeywords.robot index 28b8ce653b..0a03c9c2e5 100644 --- a/csit/libraries/TopoprocessingKeywords.robot +++ b/csit/libraries/TopoprocessingKeywords.robot @@ -1,6 +1,7 @@ *** Settings *** Variables ../variables/Variables.py Variables ../variables/topoprocessing/Topologies.py +Variables ../variables/topoprocessing/TopologyRequests.py Library RequestsLibrary Library SSHLibrary Library XML @@ -36,7 +37,7 @@ Setup Environment Issue Command On Karaf Console log:set DEBUG org.opendaylight.topoprocessing Install a Feature odl-restconf-noauth timeout=30 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${SEND_ACCEPT_XML_HEADERS} - ${features} Get Installed Features + ${features} Issue Command On Karaf Console feature:list -i ${lines} Get Lines Containing String ${features} odl-topoprocessing-framework ${length} Get Length ${lines} Install a Feature odl-openflowplugin-nsf-model-li odl-topoprocessing-framework odl-topoprocessing-network-topology odl-topoprocessing-inventory odl-mdsal-models odl-ovsdb-southbound-impl timeout=120 @@ -70,31 +71,25 @@ Prepare New Feature Installation Insert Underlay Topologies [Documentation] Insert underlay topologies used by following tests Log Inserting underlay topologies - # Network underlay topology 1 - ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:1 data=${NETWORK_UNDERLAY_TOPOLOGY_1} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 - # Network underlay topology 2 - ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:2 data=${NETWORK_UNDERLAY_TOPOLOGY_2} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 + # Network underlay topologies + : FOR ${index} IN RANGE 1 6 + \ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:${index} data=${NETWORK_UNDERLAY_TOPOLOGY_${index}} + \ Log ${resp.content} + \ Should Be Equal As Strings ${resp.status_code} 200 # Openflow underlay nodes ${resp} Put Request session ${CONFIG_API}/opendaylight-inventory:nodes data=${OPENFLOW_UNDERLAY_NODES} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 - # Openflow underlay topology 1 - ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:1 data=${OPENFLOW_UNDERLAY_TOPOLOGY_1} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 - # Openflow underlay topology 2 - ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:2 data=${OPENFLOW_UNDERLAY_TOPOLOGY_2} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 + # Openflow underlay topologies + : FOR ${index} IN RANGE 1 6 + \ ${resp} Put Request session ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:${index} data=${OPENFLOW_UNDERLAY_TOPOLOGY_${index}} + \ Log ${resp.content} + \ Should Be Equal As Strings ${resp.status_code} 200 Issue Command On Karaf Console log:clear Log ${resp.content} Prepare Unification Inside Topology Request - [Arguments] ${request_template} ${model} ${correlation_item} ${target-field} ${underlay_topo1} + [Arguments] ${request_template} ${model} ${correlation_item} ${underlay_topo1} [Documentation] Prepare topology request for unification inside from template ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlations/output-model ${request_template} Set Element Text ${request_template} aggregation-only xpath=.//correlations/correlation/type @@ -102,30 +97,144 @@ Prepare Unification Inside Topology Request ${request_template} Set Element Text ${request_template} unification xpath=.//correlation/aggregation/aggregation-type ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlation/aggregation/mapping[1]/input-model ${request_template} Set Element Text ${request_template} ${underlay_topo1} xpath=.//correlation/aggregation/mapping[1]/underlay-topology - ${request_template} Set Element Text ${request_template} ${target-field} xpath=.//correlation/aggregation/mapping[1]/target-field ${request_template} Element to String ${request_template} [Return] ${request_template} Prepare Unification Topology Request - [Arguments] ${request_template} ${model} ${correlation_item} ${target-field} ${underlay_topo1} ${underlay_topo2} + [Arguments] ${request_template} ${model} ${correlation_item} ${underlay_topo1} ${underlay_topo2} [Documentation] Prepare topology request for unification on two topologies from template - ${request_template} Prepare Unification Inside Topology Request ${request_template} ${model} ${correlation_item} ${target-field} ${underlay_topo1} + ${request_template} Prepare Unification Inside Topology Request ${request_template} ${model} ${correlation_item} ${underlay_topo1} ${request_template} Set Element Text ${request_template} ${underlay_topo2} xpath=.//correlation/aggregation/mapping[2]/underlay-topology - ${request_template} Set Element Text ${request_template} ${target-field} xpath=.//correlation/aggregation/mapping[2]/target-field ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlation/aggregation/mapping[2]/input-model ${request_template} Element to String ${request_template} [Return] ${request_template} -Get Installed Features - [Documentation] Returns list of installed features as String - Open Connection ${ODL_SYSTEM_IP} port=${KARAF_SHELL_PORT} prompt=${KARAF_PROMPT} timeout=5 - Flexible SSH Login ${KARAF_USER} ${KARAF_PASSWORD} - Write feature:list -i - ${features} Read until prompt - Close Connection - Log Installed features: - Log ${features} - [Return] ${features} +Prepare Unification Filtration Topology Request + [Arguments] ${request_template} ${model} ${target-field} ${underlay_topo2} + [Documentation] Prepare topology request for unification on two topologies from template + ${request_template} Set Element Text ${request_template} ${underlay_topo2} xpath=.//correlation/aggregation/mapping[2]/underlay-topology + ${request_template} Set Element Text ${request_template} ${target-field} xpath=.//correlation/aggregation/mapping[2]/target-field[1]/target-field-path + ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlation/aggregation/mapping[2]/input-model + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Prepare Unification Filtration Inside Topology Request + [Arguments] ${request_template} ${model} ${correlation_item} ${target-field} ${underlay_topo} + [Documentation] Prepare topology request for unification filtration inside from template + ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlations/output-model + ${request_template} Set Element Text ${request_template} filtration-aggregation xpath=.//correlations/correlation/type + ${request_template} Set Element Text ${request_template} ${correlation_item} xpath=.//correlation/correlation-item + ${request_template} Set Element Text ${request_template} unification xpath=.//correlation/aggregation/aggregation-type + ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlation/aggregation/mapping[1]/input-model + ${request_template} Set Element Text ${request_template} ${underlay_topo} xpath=.//correlation/aggregation/mapping[1]/underlay-topology + ${request_template} Set Element Text ${request_template} ${target-field} xpath=.//correlation/aggregation/mapping[1]/target-field[1]/target-field-path + ${request_template} Set Element Text ${request_template} ${underlay_topo} xpath=.//correlation/filtration/underlay-topology + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Prepare Filtration Topology Request + [Arguments] ${request_template} ${model} ${correlation_item} ${underlay_topo} + [Documentation] Prepare topology request for filtration from template + ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlations/output-model + ${request_template} Set Element Text ${request_template} ${correlation_item} xpath=.//correlation/correlation-item + ${request_template} Set Element Text ${request_template} ${underlay_topo} xpath=.//correlation/filtration/underlay-topology + [Return] ${request_template} + +Insert Target Field + [Arguments] ${request_template} ${mapping_index} ${target_field_path} ${matching_key} + [Documentation] Add target field to request + ${target_field_template} Set Element Text ${TARGET_FIELD} ${target_field_path} xpath=.//target-field-path + ${target_field_template} Set Element Text ${target_field_template} ${matching_key} xpath=.//matching-key + ${request_template} Add Element ${request_template} ${target_field_template} xpath=.//correlation/aggregation/mapping[${mapping_index}] + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Insert Filter + [Arguments] ${request_template} ${filter_template} ${target_field} + [Documentation] Add filter to filtration + ${request_template} Add Element ${request_template} ${filter_template} xpath=.//correlation/filtration + ${model} Get Element Text ${request_template} xpath=.//correlations/output-model + ${request_template} Set Element Text ${request_template} ${model} xpath=.//correlation/filtration/filter/input-model + ${request_template} Set Element Text ${request_template} ${target_field} xpath=.//correlation/filtration/filter/target-field + [Return] ${request_template} + +Set IPV4 Filter + [Arguments] ${request_template} ${ip_address} + [Documentation] Set filter ipv4 address + ${request_template} Set Element Text ${request_template} ${ip_address} xpath=.//correlation/filtration/filter/ipv4-address-filter/ipv4-address + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set Range Number Filter + [Arguments] ${request_template} ${min_number} ${max_number} + [Documentation] Set filter minimum and maximum number values + ${request_template} Set Element Text ${request_template} ${min_number} xpath=.//correlation/filtration/filter/range-number-filter/min-number-value + ${request_template} Set Element Text ${request_template} ${max_number} xpath=.//correlation/filtration/filter/range-number-filter/max-number-value + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set Range String Filter + [Arguments] ${request_template} ${min_value} ${max_value} + [Documentation] Set filter minimum and maximum string values + ${request_template} Set Element Text ${request_template} ${min_value} xpath=.//correlation/filtration/filter/range-string-filter/min-string-value + ${request_template} Set Element Text ${request_template} ${max_value} xpath=.//correlation/filtration/filter/range-string-filter/max-string-value + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set Specific Number Filter + [Arguments] ${request_template} ${number} + [Documentation] Set filter number value + ${request_template} Set Element Text ${request_template} ${number} xpath=.//correlation/filtration/filter/specific-number-filter/specific-number + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set Specific String Filter + [Arguments] ${request_template} ${string_value} + [Documentation] Set filter string value + ${request_template} Set Element Text ${request_template} ${string_value} xpath=.//correlation/filtration/filter/specific-string-filter/specific-string + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set IPV6 Filter + [Arguments] ${request_template} ${ip_address} + [Documentation] Set filter ipv6 address + ${request_template} Set Element Text ${request_template} ${ip_address} xpath=.//correlation/filtration/filter/ipv6-address-filter/ipv6-address + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Set Script Filter + [Arguments] ${request_template} ${script_language} ${script} + [Documentation] Set filter script + ${request_template} Set Element Text ${request_template} ${script_language} xpath=.//correlation/filtration/filter/script-filter/scripting/language + ${request_template} Set Element Text ${request_template} ${script} xpath=.//correlation/filtration/filter/script-filter/scripting/script + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Insert Link Computation Inside + [Arguments] ${request_template} ${link_computation_template} ${input_model} ${underlay_topology} + [Documentation] Add link computation to request + ${request_template} Add Element ${request_template} ${link_computation_template} xpath=. + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/node-info/input-model + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/link-info/input-model + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/output-model + ${request_template} Set Element Text ${request_template} ${underlay_topology} xpath=.//link-computation/link-info/link-topology + ${request_template} Set Element Attribute ${request_template} xmlns:n urn:opendaylight:topology:correlation xpath=./link-computation + ${request_template} Element to String ${request_template} + [Return] ${request_template} + +Insert Link Computation + [Arguments] ${request_template} ${link_computation_template} ${input_model} ${underlay_topology_1} ${underlay_topology_2} + [Documentation] Add link computation to request + ${request_template} Add Element ${request_template} ${link_computation_template} xpath=. + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/node-info/input-model + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/link-info[1]/input-model + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/link-info[2]/input-model + ${request_template} Set Element Text ${request_template} ${input_model} xpath=.//link-computation/output-model + ${request_template} Set Element Text ${request_template} ${underlay_topology_1} xpath=.//link-computation/link-info[1]/link-topology + ${request_template} Set Element Text ${request_template} ${underlay_topology_2} xpath=.//link-computation/link-info[2]/link-topology + ${request_template} Set Element Attribute ${request_template} xmlns:n urn:opendaylight:topology:correlation xpath=./link-computation + ${request_template} Element to String ${request_template} + [Return] ${request_template} Insert Scripting into Request [Arguments] ${request} ${language} ${script} diff --git a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot index 004e8dd89f..d99694c463 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot @@ -19,8 +19,9 @@ Resource ../../../libraries/TopoprocessingKeywords.robot *** Test Cases *** Unification Node [Documentation] Test unification operation on Network Topology model - ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:1 - ... network-topo:2 + ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node network-topo:1 network-topo:2 + ${request} Insert Target Field ${request} 0 l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 0 + ${request} Insert Target Field ${request} 1 l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 9 @@ -33,8 +34,9 @@ Unification Node Unification Node Inventory [Documentation] Test unification operation on inventory model - ${request} Prepare Unification Topology Request ${UNIFICATION_NT} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:1 - ... openflow-topo:2 + ${request} Prepare Unification Topology Request ${UNIFICATION_NT} opendaylight-inventory-model node openflow-topo:1 openflow-topo:2 + ${request} Insert Target Field ${request} 0 flow-node-inventory:ip-address 0 + ${request} Insert Target Field ${request} 1 flow-node-inventory:ip-address 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 8 @@ -51,9 +53,10 @@ Unification Node Inventory Unification Scripting Node [Documentation] Test unification operation on Network Topology model using scripting - ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:1 - ... network-topo:2 - ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNode().getValue().indexOf("192.168.1.1") > -1 && newItem.getLeafNode().getValue().indexOf("192.168.1.3") > -1 || originalItem.getLeafNode().getValue().indexOf("192.168.1.3") > -1 && newItem.getLeafNode().getValue().indexOf("192.168.1.1") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);} + ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node network-topo:1 network-topo:2 + ${request} Insert Target Field ${request} 0 l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 0 + ${request} Insert Target Field ${request} 1 l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology: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 ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 9 @@ -66,9 +69,10 @@ Unification Scripting Node Unification Scripting Node Inventory [Documentation] Test unification operation on inventory model using scripting - ${request} Prepare Unification Topology Request ${UNIFICATION_NT} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:1 - ... openflow-topo:2 - ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNode().getValue().indexOf("192.168.1.2") > -1 && newItem.getLeafNode().getValue().indexOf("192.168.1.4") > -1 || originalItem.getLeafNode().getValue().indexOf("192.168.1.4") > -1 && newItem.getLeafNode().getValue().indexOf("192.168.1.2") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);} + ${request} Prepare Unification Topology Request ${UNIFICATION_NT} opendaylight-inventory-model node openflow-topo:1 openflow-topo:2 + ${request} Insert Target Field ${request} 0 flow-node-inventory:ip-address 0 + ${request} Insert Target Field ${request} 1 flow-node-inventory: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 ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 9 @@ -81,7 +85,8 @@ Unification Scripting Node Inventory Unification Node Inside [Documentation] Test of unification type of aggregation inside on nodes on Network Topology model - ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:1 + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model node network-topo:1 + ${request} Insert Target Field ${request} 0 l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 4 @@ -94,7 +99,8 @@ Unification Node Inside Unification Node Inside Inventory [Documentation] Test of unification type of aggregation inside on nodes on Inventory model - ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:2 + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model node openflow-topo:2 + ${request} Insert Target Field ${request} 0 flow-node-inventory:ip-address 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 Should Contain X Times ${resp.content} node: 4 @@ -107,50 +113,46 @@ Unification Node Inside Inventory Unification Termination Point Inside [Documentation] Test aggregate inside operation on termination points - ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point ovsdb:ofport network-topo:1 + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point network-topo:1 + ${request} Insert Target Field ${request} 0 ovsdb:ofport 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 - ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1'] - ${response_xml} Element to String ${response_xml} Should Contain X Times ${resp.content} node: 5 - Should Contain X Times ${response_xml} 6 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='bgp:1']/.. + Should Contain X Times ${resp.content} 6 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/.. ${node} Element to String ${node} Should Contain X Times ${node} 2 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='bgp:3']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:3']/.. ${node} Element to String ${node} Should Contain X Times ${node} 2 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='bgp:4']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:4']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='bgp:5']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:5']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 - [Teardown] Run Keywords Aggregation Test Teardown - ... AND Report_Failure_Due_To_Bug 4750 Unification Termination Point Inside Inventory [Documentation] Test aggregate inside operation on termination points - ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model termination-point flow-node-inventory:port-number openflow-topo:1 + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model termination-point openflow-topo:1 + ${request} Insert Target Field ${request} 0 flow-node-inventory:port-number 0 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 Should Contain ${resp.content} topo:1 - ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1'] - ${response_xml} Element to String ${response_xml} Should Contain X Times ${resp.content} node: 5 - Should Contain X Times ${response_xml} 7 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:1']/.. + Should Contain X Times ${resp.content} 8 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. ${node} Element to String ${node} - Should Contain X Times ${node} 2 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:3']/.. + Should Contain X Times ${node} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/.. ${node} Element to String ${node} Should Contain X Times ${node} 2 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:4']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:4']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 - ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:5']/.. + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/.. ${node} Element to String ${node} Should Contain X Times ${node} 1 [Teardown] Run Keywords Aggregation Test Teardown @@ -159,4 +161,4 @@ Unification Termination Point Inside Inventory *** Keywords *** Aggregation Test Teardown Test Teardown network-topology:network-topology/topology/topo:1 - Report_Failure_Due_To_Bug 4673 + Report_Failure_Due_To_Bug 5157 diff --git a/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot b/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot new file mode 100644 index 0000000000..7e97aa66b6 --- /dev/null +++ b/csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot @@ -0,0 +1,231 @@ +*** 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 Teardown Filtration Nodes Test Teardown +Library RequestsLibrary +Library SSHLibrary +Library XML +Variables ../../../variables/topoprocessing/TopologyRequests.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/TopoprocessingKeywords.robot + +*** 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} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 + ${request} Set IPV4 Filter ${request} 192.168.1.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} bgp:1 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 3 + Should Contain ${node} tp:1:1 + Should Contain ${node} tp:1:2 + Should Contain ${node} tp:1:3 + Should Contain X Times ${resp.content} bgp:2 1 + +Filtration IPV4 Inventory Model + [Documentation] Test of ipv4 type of filtration operation on Inventory model + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_IPV4} flow-node-inventory:ip-address + ${request} Set IPV4 Filter ${request} 192.168.1.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + : FOR ${index} IN RANGE 1 3 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +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 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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 4 + : FOR ${index} IN RANGE 7 10 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + Should Contain X Times ${resp.content} 5 + Should Contain ${resp.content} tp:7:1 + Should Contain ${resp.content} tp:7:2 + Should Contain ${resp.content} tp:8:1 + Should Contain ${resp.content} tp:9:1 + Should Contain ${resp.content} tp:10:1 + +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 node openflow-topo:2 + ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} flow-node-inventory:serial-number + ${request} Set Range Number Filter ${request} 20 25 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + : FOR ${index} IN RANGE 8 10 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +Filtration Specific Number Network Topology Model + [Documentation] Test of specific number type of filtration operation on Network Topology model + Pass Execution Test is being passed due to incorrect target field. Test will be included in execution when corrected. + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ovsdb:ovs-version + ${request} Set Specific Number Filter ${request} 25 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} bgp:9 1 + Should Contain X Times ${resp.content} bgp:10 1 + Should Contain X Times ${resp.content} 2 + Should Contain ${resp.content} tp:9:1 + Should Contain ${resp.content} tp:10:1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4721 + +Filtration Specific Number Inventory Model + [Documentation] Test of specific number type of filtration operation on Inventory model + Pass Execution Test is being passed due to incorrect target field. Test will be included in execution when corrected. + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} flow-node-inventory:serial-number + ${request} Set Specific Number Filter ${request} 21 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} of-node:8 1 + Should Contain X Times ${resp.content} of-node:9 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + ... AND Report_Failure_Due_To_Bug 4721 + +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 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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} bgp:9 1 + Should Contain X Times ${resp.content} bgp:10 1 + Should Contain X Times ${resp.content} 2 + Should Contain ${resp.content} tp:9:1 + Should Contain ${resp.content} tp:10: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 node openflow-topo:2 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} flow-node-inventory:serial-number + ${request} Set Specific String Filter ${request} 21 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} of-node:8 1 + Should Contain X Times ${resp.content} of-node:9 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +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 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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 4 + : FOR ${index} IN RANGE 7 10 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + Should Contain X Times ${resp.content} 5 + Should Contain ${resp.content} tp:7:1 + Should Contain ${resp.content} tp:7:2 + Should Contain ${resp.content} tp:8:1 + Should Contain ${resp.content} tp:9:1 + Should Contain ${resp.content} tp:10:1 + +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 node openflow-topo:2 + ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} flow-node-inventory:serial-number + ${request} Set Range String Filter ${request} 20 25 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + : FOR ${index} IN RANGE 8 10 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +Filtration IPV6 Network Topology Model + [Documentation] Test of ipv6 type of filtration operation on Network Topology model + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:3 + ${request} Insert Filter ${request} ${FILTER_IPV6} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv6 + ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain X Times ${resp.content} bgp:11 1 + Should Contain X Times ${resp.content} bgp:12 1 + Should Contain X Times ${resp.content} 1 + Should Contain ${resp.content} tp:11:1 + +Filtration IPV6 Inventory Model + [Documentation] Test of ipv6 type of filtration operation on Inventory model + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:3 + ${request} Insert Filter ${request} ${FILTER_IPV6} flow-node-inventory:ip-address + ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:201/120 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + Should Contain X Times ${resp.content} of-node:12 1 + Should Contain X Times ${resp.content} of-node:14 1 + Should Contain X Times ${resp.content} of-node:15 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +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 node network-topo:1 + ${request} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology: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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + : FOR ${index} IN RANGE 3 5 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + Should Contain X Times ${resp.content} 5 + Should Contain ${resp.content} tp:3:1 + Should Contain ${resp.content} tp:3:2 + Should Contain ${resp.content} tp:4:1 + Should Contain ${resp.content} tp:4:2 + Should Contain ${resp.content} tp:5:1 + +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 node openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_SCRIPT} flow-node-inventory: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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 3 + : FOR ${index} IN RANGE 1 3 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + [Teardown] Run Keywords Filtration Nodes Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +*** Keywords *** +Filtration Nodes Test Teardown + Test Teardown network-topology:network-topology/topology/topo:1 + Report_Failure_Due_To_Bug 4673 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 new file mode 100644 index 0000000000..54565a9633 --- /dev/null +++ b/csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot @@ -0,0 +1,250 @@ +*** 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 Teardown Filtration Termination Points Test Teardown +Library RequestsLibrary +Library SSHLibrary +Library XML +Variables ../../../variables/topoprocessing/TopologyRequests.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/TopoprocessingKeywords.robot + +*** 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 termination-point network-topo:1 + ${request} Insert Filter ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address + ${request} Set IPV4 Filter ${request} 192.168.1.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 4 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + Should Contain ${node} tp:1:1 + Should Contain ${node} tp:1:2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:3']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + Should Contain ${node} tp:3:1 + Should Contain ${node} tp:3:2 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + Should Contain ${node} tp:7:1 + Should Contain ${node} tp:7:2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:6']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + Should Contain ${node} tp:6:1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 termination-point openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} flow-node-inventory:port-number + ${request} Set Range Number Filter ${request} 2 4 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 5 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4674 + +Filtration Specific Number Network Topology Model + [Documentation] Test of specific 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_SPECIFIC_NUMBER} ovsdb:ofport + ${request} Set Specific Number Filter ${request} 1119 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 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 + Should Contain ${node} tp:7:1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +Filtration Specific Number Inventory Model + [Documentation] Test of specific number type of filtration operation on Inventory model + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} flow-node-inventory:port-number + ${request} Set Specific Number Filter ${request} 1 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 7 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:4']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 3 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4674 + +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 termination-point network-topo:2 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ovsdb:name + ${request} Set Specific String Filter ${request} portC + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 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 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 termination-point openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} flow-node-inventory:name + ${request} Set Specific String Filter ${request} portB + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4674 + +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 termination-point network-topo:2 + ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ovsdb:name + ${request} Set Range String Filter ${request} portA portC + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:6']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 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 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:10']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 termination-point openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} flow-node-inventory:name + ${request} Set Range String Filter ${request} portA portB + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4674 + +Filtration IPV6 Network Topology Model + [Documentation] Test of ipv6 type of filtration operation on Network Topology model + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:3 + ${request} Insert Filter ${request} ${FILTER_IPV6} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address + ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:11']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 termination-point network-topo:1 + ${request} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address + ${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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:4']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +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 termination-point openflow-topo:1 + ${request} Insert Filter ${request} ${FILTER_SCRIPT} flow-node-inventory: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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + [Teardown] Run Keywords Filtration Termination Points Test Teardown + ... AND Report_Failure_Due_To_Bug 4674 + +*** Keywords *** +Filtration Termination Points Test Teardown + Test Teardown network-topology:network-topology/topology/topo:1 + Report_Failure_Due_To_Bug 4673 diff --git a/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot b/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot new file mode 100644 index 0000000000..cb88d327da --- /dev/null +++ b/csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot @@ -0,0 +1,151 @@ +*** 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 Teardown Filtration Links Test Teardown +Library RequestsLibrary +Library SSHLibrary +Library XML +Variables ../../../variables/topoprocessing/TopologyRequests.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/TopoprocessingKeywords.robot + +*** 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} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric + ${request} Set Range Number Filter ${request} 11 13 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 3 + Should Contain X Times ${resp.content} link:1:4 1 + Should Contain X Times ${resp.content} link:1:3 1 + Should Contain X Times ${resp.content} link:1:2-1 1 + +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} Insert Filter ${request} ${FILTER_RANGE_NUMBER} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric + ${request} Set Range Number Filter ${request} 14 15 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 2 + Should Contain X Times ${resp.content} link:14:12 1 + Should Contain X Times ${resp.content} link:15:13 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4761 + +Filtration Specific Number Network Topology Model + [Documentation] Test of specific number type of filtration operation on Network Topology model + Pass Execution Test is being passed due to incorrect target field. Test will be included in execution when corrected. + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric + ${request} Set Specific Number Filter ${request} 12 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 2 + Should Contain X Times ${resp.content} link:1:4 1 + Should Contain X Times ${resp.content} link:1:2-1 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4721 + +Filtration Specific Number Inventory Model + [Documentation] Test of specific number type of filtration operation on Inventory model + Pass Execution Test is being passed due to incorrect target field. Test will be included in execution when corrected. + ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3 + ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric + ${request} Set Specific Number Filter ${request} 16 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 1 + Should Contain X Times ${resp.content} link:11:12 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4761 + ... AND Report_Failure_Due_To_Bug 4721 + +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} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name + ${request} Set Specific String Filter ${request} linkA + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 2 + Should Contain X Times ${resp.content} link:1:4 1 + Should Contain X Times ${resp.content} link:1:2-1 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} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name + ${request} Set Specific String Filter ${request} linkD + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 1 + Should Contain X Times ${resp.content} link:15:13 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4761 + +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} Insert Filter ${request} ${FILTER_RANGE_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name + ${request} Set Range String Filter ${request} linkA linkB + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 3 + Should Contain X Times ${resp.content} link:1:4 1 + Should Contain X Times ${resp.content} link:1:3 1 + Should Contain X Times ${resp.content} link:1:2-1 1 + +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} Insert Filter ${request} ${FILTER_RANGE_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name + ${request} Set Range String Filter ${request} linkC linkD + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 2 + Should Contain X Times ${resp.content} link:14:12 1 + Should Contain X Times ${resp.content} link:15:13 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4761 + +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} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology: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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 2 + Should Contain X Times ${resp.content} link:1:3 1 + Should Contain X Times ${resp.content} link:1:2-2 1 + +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} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology: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 ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} link: 3 + Should Contain X Times ${resp.content} link:11:12 1 + Should Contain X Times ${resp.content} link:14:12 1 + Should Contain X Times ${resp.content} link:15:13 1 + [Teardown] Run Keywords Filtration Links Test Teardown + ... AND Report_Failure_Due_To_Bug 4761 + +*** Keywords *** +Filtration Links Test Teardown + Test Teardown network-topology:network-topology/topology/topo:1 + Report_Failure_Due_To_Bug 4673 diff --git a/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot b/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot new file mode 100644 index 0000000000..e229c5d1c0 --- /dev/null +++ b/csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot @@ -0,0 +1,147 @@ +*** 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 Teardown Aggregation Filtration Test Teardown +Library RequestsLibrary +Library SSHLibrary +Library XML +Variables ../../../variables/topoprocessing/TopologyRequests.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/TopoprocessingKeywords.robot + +*** Test Cases *** +Unification Filtration Node Inside Network Topology model + [Documentation] Test unification filtration inside operation on Network Topology model + ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:4 + ${request} Insert Filter ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 + ${request} Set IPV4 Filter ${request} 192.168.2.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain ${resp.content} bgp: 3 + : FOR ${index} IN RANGE 18 20 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:18']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + Should Contain ${node} bgp:18 + Should Contain ${node} bgp:20 + +Unification Filtration Node Inside Inventory model + [Documentation] Test unification filtration inside operation on Inventory model + ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:4 + ${request} Insert Filter ${request} ${FILTER_IPV4} flow-node-inventory:ip-address + ${request} Set IPV4 Filter ${request} 192.168.2.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 2 + Should Contain ${resp.content} of-node: 4 + : FOR ${index} IN RANGE 17 20 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:17']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 3 + Should Contain ${node} of-node:17 + Should Contain ${node} of-node:19 + Should Contain ${node} of-node:20 + [Teardown] Run Keywords Aggregation Filtration Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +Unification Filtration Termination Point Inside Network Topology model + [Documentation] Test unification filtration inside operation on Network Topology model + ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address network-topo:5 + ${request} Insert Filter ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address + ${request} Set IPV4 Filter ${request} 192.168.1.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${resp.content} 4 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:21']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${tp} Get Element ${node} xpath=.//termination-point/supporting-termin-point[tp-ref='tp:21:2']/.. + ${tp} Element to String ${tp} + Should Contain X Times ${tp} tp: 2 + Should Contain ${tp} tp:21:3 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:22']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + Should Contain X Times ${node} tp: 1 + Should Contain ${node} tp:22:2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:24']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + Should Contain X Times ${node} tp: 3 + Should Contain ${node} tp:24:1 + Should Contain ${node} tp:24:2 + Should Contain ${node} tp:24:3 + [Teardown] Run Keywords Aggregation Filtration Test Teardown + ... AND Report_Failure_Due_To_Bug 4750 + +Unification Filtration Node Network Topology model + [Documentation] Test unification filtration operation on Network Topology model + ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:4 + ${request} Prepare Unification Filtration Topology Request ${request} network-topology-model l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:1 + ${request} Insert Filter ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 + ${request} Set IPV4 Filter ${request} 192.168.2.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + : FOR ${index} IN RANGE 18 20 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + : FOR ${index} IN RANGE 1 5 + \ Should Contain X Times ${resp.content} bgp:${index} 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:18']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 4 + Should Contain ${node} bgp:18 + Should Contain ${node} bgp:20 + Should Contain ${node} bgp:3 + Should Contain ${node} bgp:4 + Should Contain ${node} 4 + Should Contain ${node} tp:3:1 + Should Contain ${node} tp:3:2 + Should Contain ${node} tp:4:1 + Should Contain ${node} tp:4:2 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:5']/.. + ${node} Element to String ${node} + Should Contain ${node} 1 + Should Contain ${node} tp:5:1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/.. + ${node} Element to String ${node} + Should Contain ${node} 3 + Should Contain ${node} tp:1:1 + Should Contain ${node} tp:1:2 + Should Contain ${node} tp:1:3 + +Unification Filtration Node Inventory model + [Documentation] Test unification filtration operation on Inventory model + ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:4 + ${request} Prepare Unification Filtration Topology Request ${request} opendaylight-inventory-model flow-node-inventory:ip-address openflow-topo:6 + ${request} Insert Filter ${request} ${FILTER_IPV4} flow-node-inventory:ip-address + ${request} Set IPV4 Filter ${request} 192.168.1.1/24 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + Should Contain X Times ${resp.content} node: 5 + : FOR ${index} IN RANGE 6 10 + \ Should Contain X Times ${resp.content} of-node:${index} 1 + Should Contain X Times ${resp.content} of-node:16 1 + ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:6']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + Should Contain ${node} of-node:6 + Should Contain ${node} of-node:16 + [Teardown] Run Keywords Aggregation Filtration Test Teardown + ... AND Report_Failure_Due_To_Bug 4683 + +*** Keywords *** +Aggregation Filtration Test Teardown + Test Teardown network-topology:network-topology/topology/topo:1 + Report_Failure_Due_To_Bug 4673 diff --git a/csit/suites/topoprocessing/basic/010_Restconf_OK.robot b/csit/suites/topoprocessing/basic/010_Restconf_OK.robot index 4d19667e2d..0e3425d521 100644 --- a/csit/suites/topoprocessing/basic/010_Restconf_OK.robot +++ b/csit/suites/topoprocessing/basic/010_Restconf_OK.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation Test suite to verify Restconf is OK -Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions Library RequestsLibrary Variables ../../../variables/Variables.py diff --git a/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot b/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot index d6b1f967dc..5a3e14a129 100644 --- a/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot +++ b/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot @@ -48,17 +48,17 @@ Unification on Network Topology *** Keywords *** Setup Enviroment [Documentation] Setup karaf enviroment for following tests - Open Connection ${CONTROLLER} + Open Connection ${ODL_SYSTEM_IP} Flexible Controller Login Put File ${CONFIGURATION_XML} ${REMOTE_FILE} Close Connection Issue Command On Karaf Console log:set DEBUG org.opendaylight.topoprocessing Install a Feature odl-topoprocessing-framework odl-restconf-noauth timeout=30 - Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${SEND_ACCEPT_XML_HEADERS} + Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${SEND_ACCEPT_XML_HEADERS} Test Teardown [Documentation] Revert startup changes - Open Connection ${CONTROLLER} + Open Connection ${ODL_SYSTEM_IP} Flexible Controller Login Put File ${OPERATIONAL_XML} ${REMOTE_FILE} Close Connection @@ -67,7 +67,7 @@ Test Teardown Wait For Karaf Log [Arguments] ${message} ${timeout}=60 [Documentation] Read karaf logs until message appear - Open Connection ${CONTROLLER} port=${KARAF_SHELL_PORT} prompt=${KARAF_PROMPT} timeout=${timeout} + Open Connection ${ODL_SYSTEM_IP} port=${KARAF_SHELL_PORT} prompt=${KARAF_PROMPT} timeout=${timeout} Flexible SSH Login ${KARAF_USER} ${KARAF_PASSWORD} Write log:tail Read Until ${message} diff --git a/csit/variables/topoprocessing/Topologies.py b/csit/variables/topoprocessing/Topologies.py index f4473dde53..2056d3bb83 100644 --- a/csit/variables/topoprocessing/Topologies.py +++ b/csit/variables/topoprocessing/Topologies.py @@ -16,10 +16,16 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' tp:1:1 1119 + + 192.168.1.5 + tp:1:2 1119 + + 192.168.1.6 + tp:1:3 @@ -48,10 +54,16 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' tp:3:1 1118 + + 192.168.1.5 + tp:3:2 2118 + + 192.168.1.6 + @@ -66,10 +78,16 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' tp:4:1 1117 + + 192.168.2.6 + tp:4:2 1117 + + 192.168.2.7 + @@ -84,8 +102,63 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' tp:5:1 1116 + + 192.168.2.8 + + + link:1:4 + + bgp:1 + + + bgp:4 + + + linkA + 12 + + + + link:1:3 + + bgp:1 + + + bgp:3 + + + linkB + 11 + + + + link:1:2-1 + + bgp:1 + + + bgp:2 + + + linkA + 12 + + + + link:1:2-2 + + bgp:1 + + + bgp:2 + + + linkC + 14 + + ''' NETWORK_UNDERLAY_TOPOLOGY_2 = '''network-topo:2 bgp:6 + 10 @@ -106,10 +180,15 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' tp:6:1 1116 + portA + + 192.168.1.7 + bgp:7 + 20 @@ -119,11 +198,24 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' tp:7:1 + 1119 + portD + + 192.168.1.8 + + + + tp:7:2 1117 + portC + + 192.168.1.9 + bgp:8 + 21 @@ -138,6 +230,7 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' bgp:9 + 25 @@ -152,6 +245,7 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' bgp:10 + 25 @@ -162,8 +256,358 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' tp:10:1 1122 + portB + + 192.168.2.9 + + + + ''' + +NETWORK_UNDERLAY_TOPOLOGY_3 = ''' + network-topo:3 + + bgp:11 + + + + fe80:0:0:0:0:0:c0a8:103 + + + + + tp:11:1 + + fe80:0:0:0:0:0:c0a8:107 + + + + + bgp:12 + + + + fe80:0:0:0:0:0:c0a8:104 + + + + + + bgp:13 + + + + fe80:0:0:0:0:0:c0a8:204 + + + + + + bgp:14 + + + + fe80:0:0:0:0:0:c0a8:205 + + + + + tp:14:1 + + fe80:0:0:0:0:0:c0a8:207 + + + + tp:14:2 + + fe80:0:0:0:0:0:c0a8:209 + + + + + bgp:15 + + + + fe80:0:0:0:0:0:c0a8:203 + + + + + ''' + +NETWORK_UNDERLAY_TOPOLOGY_4 = ''' + network-topo:4 + + bgp:16 + + + + 192.168.1.1 + + + + + + bgp:17 + + + + 192.168.1.2 + + + + + + bgp:18 + + + + 192.168.2.1 + + + + + + bgp:19 + + + + 192.168.2.2 + + + + + + bgp:20 + + + + 192.168.2.1 + + + + + ''' + +NETWORK_UNDERLAY_TOPOLOGY_5 = ''' + network-topo:5 + + bgp:21 + + + + 192.168.1.1 + + + + + tp:21:1 + + 192.168.1.9 + + + + tp:21:2 + + 192.168.1.8 + + + + tp:21:3 + + 192.168.1.8 + + + + + bgp:22 + + + + 192.168.1.2 + + + + + tp:22:1 + + 192.168.2.9 + + + tp:22:2 + + 192.168.1.7 + + + + + bgp:23 + + + + 192.168.2.1 + + + + + + bgp:24 + + + + 192.168.2.2 + + + + + tp:24:1 + + 192.168.1.7 + + + + tp:24:2 + + 192.168.1.7 + + + + tp:24:3 + + 192.168.1.7 + + + + + bgp:25 + + + + 192.168.2.1 + + + + + ''' + +NETWORK_UNDERLAY_TOPOLOGY_6 = ''' + network-topo:6 + + bgp:26 + + + + 192.168.1.1 + + + + + + bgp:27 + + + + 192.168.1.2 + + + + + + bgp:28 + + + + 192.168.2.1 + + + + + + bgp:29 + + + + 192.168.2.1 + + + + + + bgp:30 + + + + 192.168.2.3 + + + + + link:26:28 + + bgp:26 + + + bgp:28 + + + linkA + 17 + + + + link:28:29 + + bgp:28 + + + bgp:29 + + + linkB + 11 + + + + link:29:30-1 + + bgp:29 + + + bgp:30 + + + linkA + 12 + + + + link:29:30-2 + + bgp:29 + + + bgp:30 + + + linkC + 12 + + ''' OPENFLOW_UNDERLAY_NODES = ''' @@ -175,6 +619,7 @@ OPENFLOW_UNDERLAY_NODES = ''' openflow:1:1 1 + portC openflow:1:2 @@ -182,19 +627,28 @@ OPENFLOW_UNDERLAY_NODES = ''' Pantheon Technologies 192.168.1.1 + 19 openflow:2 openflow:2:1 1 + portB openflow:2:2 2 + portD + + + openflow:2:3 + 3 + portA Pantheon Technologies 192.168.1.2 + 20 openflow:3 @@ -212,6 +666,7 @@ OPENFLOW_UNDERLAY_NODES = ''' Pantheon Technologies 192.168.1.3 + 8 openflow:4 @@ -229,40 +684,163 @@ OPENFLOW_UNDERLAY_NODES = ''' Cisco 192.168.2.1 + 21 openflow:5 openflow:5:1 3 + portB Cisco 192.168.2.2 + 25 openflow:6 Pantheon Technologies 192.168.1.1 + 26 openflow:7 Pantheon Technologies 192.168.2.3 + 19 openflow:8 Cisco 192.168.1.4 + 21 openflow:9 Cisco 192.168.2.3 + 21 openflow:10 Cisco 192.168.2.1 + 25 + + + openflow:11 + Pantheon Technologies + fe80:0:0:0:0:0:c0a8:103 + 29 + + + openflow:12 + Pantheon Technologies + fe80:0:0:0:0:0:c0a8:201 + 19 + + + openflow:13 + Cisco + fe80:0:0:0:0:0:c0a8:104 + 21 + + + openflow:14 + Cisco + fe80:0:0:0:0:0:c0a8:205 + 21 + + + openflow:15 + Cisco + fe80:0:0:0:0:0:c0a8:203 + 12 + + + openflow:16 + Pantheon Technologies + 192.168.1.1 + 26 + + + openflow:17 + Pantheon Technologies + 192.168.2.3 + 19 + + + openflow:18 + Cisco + 192.168.2.4 + 21 + + + openflow:19 + Cisco + 192.168.2.3 + 21 + + + openflow:20 + Cisco + 192.168.2.3 + 25 + + + openflow:21 + Pantheon Technologies + 192.168.1.1 + 19 + + openflow:21:1 + 1 + portC + + + + openflow:22 + Pantheon Technologies + 192.168.1.2 + 20 + + openflow:22:1 + 2 + portB + + + openflow:22:2 + 3 + portD + + + openflow:22:3 + 1 + portA + + + + openflow:23 + Pantheon Technologies + 192.168.1.3 + 8 + + + openflow:24 + Cisco + 192.168.2.1 + 21 + + + openflow:25 + Cisco + 192.168.2.2 + 25 + + openflow:25:1 + 4 + portB + ''' @@ -304,6 +882,12 @@ OPENFLOW_UNDERLAY_TOPOLOGY_1 = ''' /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:2"] + + tp:3 + + /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:3"] + + of-node:3 @@ -390,3 +974,201 @@ OPENFLOW_UNDERLAY_TOPOLOGY_2 = ''' ''' + +OPENFLOW_UNDERLAY_TOPOLOGY_3 = ''' + + openflow-topo:3 + + of-node:11 + /inventory:nodes/inventory:node[inventory:id="openflow:11"] + + + of-node:12 + /inventory:nodes/inventory:node[inventory:id="openflow:12"] + + + of-node:13 + /inventory:nodes/inventory:node[inventory:id="openflow:13"] + + + of-node:14 + /inventory:nodes/inventory:node[inventory:id="openflow:14"] + + + of-node:15 + /inventory:nodes/inventory:node[inventory:id="openflow:15"] + + + link:11:12 + + of-node:11 + + + of-node:12 + + + linkB + 16 + + + + link:14:12 + + of-node:14 + + + of-node:12 + + + linkC + 14 + + + + link:15:13 + + of-node:15 + + + of-node:13 + + + linkD + 15 + + + + link:11:13 + + of-node:11 + + + of-node:13 + + + linkA + 13 + + + +''' +OPENFLOW_UNDERLAY_TOPOLOGY_4 = ''' + + openflow-topo:4 + + of-node:16 + /inventory:nodes/inventory:node[inventory:id="openflow:16"] + + + of-node:17 + /inventory:nodes/inventory:node[inventory:id="openflow:17"] + + + of-node:18 + /inventory:nodes/inventory:node[inventory:id="openflow:18"] + + + of-node:19 + /inventory:nodes/inventory:node[inventory:id="openflow:19"] + + + of-node:20 + /inventory:nodes/inventory:node[inventory:id="openflow:20"] + + +''' + +OPENFLOW_UNDERLAY_TOPOLOGY_5 = ''' + + openflow-topo:5 + + of-node:21 + /inventory:nodes/inventory:node[inventory:id="openflow:21"] + + tp:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:21"]/inventory:node-connector[inventory:id="openflow:21:1"] + + + + + of-node:22 + /inventory:nodes/inventory:node[inventory:id="openflow:22"] + + tp:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:22"]/inventory:node-connector[inventory:id="openflow:22:1"] + + + + tp:2 + + /inventory:nodes/inventory:node[inventory:id="openflow:22"]/inventory:node-connector[inventory:id="openflow:22:2"] + + + + tp:3 + + /inventory:nodes/inventory:node[inventory:id="openflow:22"]/inventory:node-connector[inventory:id="openflow:22:3"] + + + + + of-node:23 + /inventory:nodes/inventory:node[inventory:id="openflow:23"] + + + of-node:24 + /inventory:nodes/inventory:node[inventory:id="openflow:24"] + + + of-node:25 + /inventory:nodes/inventory:node[inventory:id="openflow:25"] + + tp:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:25"]/inventory:node-connector[inventory:id="openflow:25:1"] + + + + +''' + +OPENFLOW_UNDERLAY_TOPOLOGY_6 = ''' + + openflow-topo:6 + + of-node:26 + /inventory:nodes/inventory:node[inventory:id="openflow:6"] + + + of-node:27 + /inventory:nodes/inventory:node[inventory:id="openflow:7"] + + + of-node:28 + /inventory:nodes/inventory:node[inventory:id="openflow:8"] + + + of-node:29 + /inventory:nodes/inventory:node[inventory:id="openflow:9"] + + + of-node:30 + /inventory:nodes/inventory:node[inventory:id="openflow:10"] + + +''' diff --git a/csit/variables/topoprocessing/TopologyRequests.py b/csit/variables/topoprocessing/TopologyRequests.py index 6d8a0f38d9..96531d2994 100644 --- a/csit/variables/topoprocessing/TopologyRequests.py +++ b/csit/variables/topoprocessing/TopologyRequests.py @@ -11,13 +11,13 @@ UNIFICATION_NT = ''' {input-model} {underlay-topology-id} - {target-field} + false {input-model} {underlay-topology-id} - {target-field} + false @@ -38,7 +38,7 @@ UNIFICATION_NT_AGGREGATE_INSIDE = ''' ''' +UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE = ''' + topo:1 + + {output-model} + + 1 + {type} + {correlation-item} + + {aggregation-type} + + 1 + {input-model} + {underlay-topology-id} + + true + + + + {underlay-topology-id} + + + + ''' + +UNIFICATION_FILTRATION_NT = ''' + topo:1 + + {output-model} + + 1 + {type} + {correlation-item} + + {aggregation-type} + + 1 + {input-model} + {underlay-topology-id} + + false + + + {input-model} + {underlay-topology-id} + + false + + + + {underlay-topology-id} + + + + ''' + FILTRATION_NT = ''' topo:1 @@ -62,6 +118,13 @@ FILTRATION_NT = ''' ''' +TARGET_FIELD = ''' + + {target-field-path} + {matching-key} + +''' + SCRIPTING = ''' {language} @@ -70,6 +133,21 @@ SCRIPTING = ''' ''' +FILTER_SCRIPT = ''' + {input-model} + 1 + {target-field} + script + + + {language} + + + + ''' + FILTER_IPV4 = ''' {input-model} @@ -80,3 +158,83 @@ FILTER_IPV4 = ''' {ipv4} ''' + +FILTER_IPV6 = ''' + {input-model} + 1 + {target-field} + ipv6-address + + {ipv6} + + ''' + +FILTER_RANGE_NUMBER = ''' + {input-model} + 1 + {target-field} + range-number + + {min} + {max} + + ''' + +FILTER_RANGE_STRING = ''' + {input-model} + 1 + {target-field} + range-string + + {min} + {max} + + ''' + +FILTER_SPECIFIC_NUMBER = ''' + {input-model} + 1 + {target-field} + specific-number + + {number} + + ''' + +FILTER_SPECIFIC_STRING = ''' + {input-model} + 1 + {target-field} + specific-string + + {string} + + ''' + +LINK_COMPUTATION_INSIDE = ''' + {output-model} + + topo:1 + {input-model} + + + {underlay-topology-id} + {input-model} + + ''' + +LINK_COMPUTATION = ''' + {output-model} + + topo:1 + {input-model} + + + {underlay-topology-1-id} + {input-model} + + + {underlay-topology-2-id} + {input-model} + + ''' -- 2.36.6