2 Documentation Test suite to verify fitration operation on different models.
3 ... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL.
4 ... Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot.
5 ... Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational xmls and verify output.
6 ... Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls.
7 Suite Setup Setup Environment
8 Suite Teardown Clean Environment
9 Test Teardown Delete Overlay Topology
10 Library RequestsLibrary
13 Variables ../../../variables/topoprocessing/TopologyRequests.py
14 Variables ../../../variables/topoprocessing/TargetFields.py
15 Variables ../../../variables/Variables.py
16 Resource ../../../libraries/KarafKeywords.robot
17 Resource ../../../libraries/Utils.robot
18 Resource ../../../libraries/TopoprocessingKeywords.robot
21 Filtration Range Number Network Topology Model
22 [Documentation] Test of range number type of filtration operation on Network Topology model
23 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
24 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC}
25 ${request} Set Range Number Filter ${request} 11 13
26 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
27 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3
28 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4
30 Filtration Range Number Inventory Model
31 [Documentation] Test of range number type of filtration operation on Inventory model
32 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
33 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC}
34 ${request} Set Range Number Filter ${request} 14 15
35 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
36 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2
37 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13
39 Filtration Specific String Network Topology Model
40 [Documentation] Test of specific string type of filtration operation on Network Topology model
41 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
42 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${IGP_LINK_NAME}
43 ${request} Set Specific String Filter ${request} linkA
44 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
45 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2
46 Check Filtered Links In Topology ${resp.content} link:1:4 link:1:2-1
48 Filtration Specific String Inventory Model
49 [Documentation] Test of specific string type of filtration operation on Inventory model
50 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
51 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${IGP_LINK_NAME}
52 ${request} Set Specific String Filter ${request} linkD
53 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
54 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=1 link-ref_count=1
55 Check Filtered Links In Topology ${resp.content} link:15:13
57 Filtration Range String Network Topology Model
58 [Documentation] Test of range string type of filtration operation on Network Topology model
59 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
60 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${IGP_LINK_NAME}
61 ${request} Set Range String Filter ${request} linkA linkB
62 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
63 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3
64 Check Filtered Links In Topology ${resp.content} link:1:2-1 link:1:3 link:1:4
66 Filtration Range String Inventory Model
67 [Documentation] Test of range string type of filtration operation on Inventory model
68 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
69 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${IGP_LINK_NAME}
70 ${request} Set Range String Filter ${request} linkC linkD
71 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
72 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2
73 Check Filtered Links In Topology ${resp.content} link:14:12 link:15:13
75 Filtration Script Network Topology Model
76 [Documentation] Test of script type of filtration operation on Network Topology model
77 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
78 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${IGP_LINK_NAME}
79 ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
80 ${request} Set Script Filter ${request} javascript ${script}
81 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
82 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=2 link-ref_count=2
83 Check Filtered Links In Topology ${resp.content} link:1:2-2 link:1:3
85 Filtration Script Inventory Model
86 [Documentation] Test of script type of filtration operation on Inventory model
87 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
88 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${IGP_LINK_NAME}
89 ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
90 ${request} Set Script Filter ${request} javascript ${script}
91 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
92 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete link_count=3 link-ref_count=3
93 Check Filtered Links In Topology ${resp.content} link:11:12 link:14:12 link:15:13