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 Filtration Links Test Teardown
10 Library RequestsLibrary
13 Variables ../../../variables/topoprocessing/TopologyRequests.py
14 Variables ../../../variables/Variables.py
15 Resource ../../../libraries/KarafKeywords.robot
16 Resource ../../../libraries/Utils.robot
17 Resource ../../../libraries/TopoprocessingKeywords.robot
20 Filtration Range Number Network Topology Model
21 [Documentation] Test of range number type of filtration operation on Network Topology model
22 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
23 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
24 ${request} Set Range Number Filter ${request} 11 13
25 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
26 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
27 Should Contain X Times ${resp.content} <link-id>link: 3
28 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref> 1
29 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref> 1
30 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref> 1
32 Filtration Range Number Inventory Model
33 [Documentation] Test of range number type of filtration operation on Inventory model
34 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
35 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
36 ${request} Set Range Number Filter ${request} 14 15
37 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
38 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
39 Should Contain X Times ${resp.content} <link-id>link: 2
40 Should Contain X Times ${resp.content} <link-ref>link:14:12</link-ref> 1
41 Should Contain X Times ${resp.content} <link-ref>link:15:13</link-ref> 1
43 Filtration Specific String Network Topology Model
44 [Documentation] Test of specific string type of filtration operation on Network Topology model
45 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
46 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
47 ${request} Set Specific String Filter ${request} linkA
48 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
49 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
50 Should Contain X Times ${resp.content} <link-id>link: 2
51 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref> 1
52 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref> 1
54 Filtration Specific String Inventory Model
55 [Documentation] Test of specific string type of filtration operation on Inventory model
56 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
57 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
58 ${request} Set Specific String Filter ${request} linkD
59 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
60 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
61 Should Contain X Times ${resp.content} <link-id>link: 1
62 Should Contain X Times ${resp.content} <link-ref>link:15:13</link-ref> 1
64 Filtration Range String Network Topology Model
65 [Documentation] Test of range string type of filtration operation on Network Topology model
66 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
67 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
68 ${request} Set Range String Filter ${request} linkA linkB
69 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
70 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
71 Should Contain X Times ${resp.content} <link-id>link: 3
72 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref> 1
73 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref> 1
74 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref> 1
76 Filtration Range String Inventory Model
77 [Documentation] Test of range string type of filtration operation on Inventory model
78 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
79 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
80 ${request} Set Range String Filter ${request} linkC linkD
81 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
82 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
83 Should Contain X Times ${resp.content} <link-id>link: 2
84 Should Contain X Times ${resp.content} <link-ref>link:14:12</link-ref> 1
85 Should Contain X Times ${resp.content} <link-ref>link:15:13</link-ref> 1
87 Filtration Script Network Topology Model
88 [Documentation] Test of script type of filtration operation on Network Topology model
89 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model link network-topo:1
90 ${request} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
91 ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
92 ${request} Set Script Filter ${request} javascript ${script}
93 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
94 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
95 Should Contain X Times ${resp.content} <link-id>link: 2
96 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref> 1
97 Should Contain X Times ${resp.content} <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-2</link-ref> 1
99 Filtration Script Inventory Model
100 [Documentation] Test of script type of filtration operation on Inventory model
101 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model link openflow-topo:3
102 ${request} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
103 ${script} Set Variable if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
104 ${request} Set Script Filter ${request} javascript ${script}
105 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
106 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
107 Should Contain X Times ${resp.content} <link-id>link: 3
108 Should Contain X Times ${resp.content} <link-ref>link:11:12</link-ref> 1
109 Should Contain X Times ${resp.content} <link-ref>link:14:12</link-ref> 1
110 Should Contain X Times ${resp.content} <link-ref>link:15:13</link-ref> 1
113 Filtration Links Test Teardown
114 Test Teardown network-topology:network-topology/topology/topo:1
115 Report_Failure_Due_To_Bug 5188