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 ${OVERLAY_TOPO_URL}
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 ${OVERLAY_TOPO_URL} ${TOPOLOGY_URL}/topo:1
24 Filtration Range Number Network Topology Model
25 [Documentation] Test of range number type of filtration operation on Network Topology model
26 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
27 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OFPORT}
28 ${request} Set Range Number Filter ${request} 1115 1119
29 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
30 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
31 Should Contain X Times ${resp.content} <termination-point> 3
32 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1
33 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:1 tp:7:2
34 Check Filtered Termination Points in Node ${resp.content} bgp:8
35 Check Filtered Termination Points in Node ${resp.content} bgp:9
36 Check Filtered Termination Points in Node ${resp.content} bgp:10
38 Filtration Range Number Inventory Model
39 [Documentation] Test of range number type of filtration operation on Inventory model
40 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
41 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}
42 ${request} Set Range Number Filter ${request} 2 4
43 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
44 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
45 Should Contain X Times ${resp.content} <termination-point> 5
46 Check Filtered Termination Points in Node ${resp.content} of-node:1
47 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:3 tp:2:2
48 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2
49 Check Filtered Termination Points in Node ${resp.content} of-node:4
50 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
52 Filtration Specific Number Network Topology Model
53 [Documentation] Test of specific number type of filtration operation on Network Topology model
54 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
55 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OVSDB_OFPORT}
56 ${request} Set Specific Number Filter ${request} 1119
57 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
58 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
59 Should Contain X Times ${resp.content} <termination-point> 1
60 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
61 ${node} Element to String ${node}
62 Should Contain X Times ${node} <termination-point> 1
63 Check Filtered Termination Points in Node ${resp.content} bgp:6
64 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:1
65 Check Filtered Termination Points in Node ${resp.content} bgp:8
66 Check Filtered Termination Points in Node ${resp.content} bgp:9
67 Check Filtered Termination Points in Node ${resp.content} bgp:10
69 Filtration Specific Number Inventory Model
70 [Documentation] Test of specific number type of filtration operation on Inventory model
71 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
72 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OPENFLOW_NODE_CONNECTOR_MAXIMUM_SPEED}
73 ${request} Set Specific Number Filter ${request} 2
74 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
75 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
76 Should Contain X Times ${resp.content} <termination-point> 3
77 Check Filtered Termination Points in Node ${resp.content} of-node:1
78 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2
79 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2
80 Check Filtered Termination Points in Node ${resp.content} of-node:4
81 Check Filtered Termination Points in Node ${resp.content} of-node:5
83 Filtration Specific String Network Topology Model
84 [Documentation] Test of specific string type of filtration operation on Network Topology model
85 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
86 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_TP_NAME}
87 ${request} Set Specific String Filter ${request} portC
88 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
89 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
90 Should Contain X Times ${resp.content} <termination-point> 1
91 Check Filtered Termination Points in Node ${resp.content} bgp:6
92 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2
93 Check Filtered Termination Points in Node ${resp.content} bgp:8
94 Check Filtered Termination Points in Node ${resp.content} bgp:9
95 Check Filtered Termination Points in Node ${resp.content} bgp:10
97 Filtration Specific String Inventory Model
98 [Documentation] Test of specific string type of filtration operation on Inventory model
99 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
100 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME}
101 ${request} Set Specific String Filter ${request} portB
102 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
103 Should Contain X Times ${resp.content} <termination-point> 2
104 Check Filtered Termination Points in Node ${resp.content} of-node:1
105 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1
106 Check Filtered Termination Points in Node ${resp.content} of-node:3
107 Check Filtered Termination Points in Node ${resp.content} of-node:4
108 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
110 Filtration Range String Network Topology Model
111 [Documentation] Test of range string type of filtration operation on Network Topology model
112 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
113 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_TP_NAME}
114 ${request} Set Range String Filter ${request} portA portC
115 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
116 Should Contain ${resp.content} <topology-id>topo:1</topology-id> ${EMPTY}
117 Should Contain X Times ${resp.content} <termination-point> 3
118 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1
119 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2
120 Check Filtered Termination Points in Node ${resp.content} bgp:8
121 Check Filtered Termination Points in Node ${resp.content} bgp:9
122 Check Filtered Termination Points in Node ${resp.content} bgp:10 tp:10:1
124 Filtration Range String Inventory Model
125 [Documentation] Test of range string type of filtration operation on Inventory model
126 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
127 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME}
128 ${request} Set Range String Filter ${request} portA portB
129 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
130 Should Contain X Times ${resp.content} <termination-point> 3
131 Check Filtered Termination Points in Node ${resp.content} of-node:1
132 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1 tp:2:3
133 Check Filtered Termination Points in Node ${resp.content} of-node:3
134 Check Filtered Termination Points in Node ${resp.content} of-node:4
135 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
137 Filtration Script Network Topology Model
138 [Documentation] Test of script type of filtration operation on Network Topology model
139 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:1
140 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OVSDB_OFPORT}
141 ${script} Set Variable if (node.getValue() > 1117 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
142 ${request} Set Script Filter ${request} javascript ${script}
143 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
144 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
145 Should Contain X Times ${resp.content} <termination-point> 3
146 Check Filtered Termination Points in Node ${resp.content} bgp:1
147 Check Filtered Termination Points in Node ${resp.content} bgp:2
148 Check Filtered Termination Points in Node ${resp.content} bgp:3
149 Check Filtered Termination Points in Node ${resp.content} bgp:4 tp:4:1 tp:4:2
150 Check Filtered Termination Points in Node ${resp.content} bgp:5 tp:5:1
152 Filtration Script Inventory Model
153 [Documentation] Test of script type of filtration operation on Inventory model
154 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
155 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_CONNECTOR_NAME}
156 ${script} Set Variable if (node.getValue().indexOf("portB") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
157 ${request} Set Script Filter ${request} javascript ${script}
158 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
159 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
160 Should Contain X Times ${resp.content} <termination-point> 3
161 Check Filtered Termination Points in Node ${resp.content} of-node:1 tp:1:1
162 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2 tp:2:3
163 Check Filtered Termination Points in Node ${resp.content} of-node:3
164 Check Filtered Termination Points in Node ${resp.content} of-node:4
165 Check Filtered Termination Points in Node ${resp.content} of-node:5