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 IPV4 Network Topology Model
25 [Documentation] Test of ipv4 type of filtration operation on Network Topology model
26 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:1
27 ${request} Insert Filter ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4}
28 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
29 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 2
30 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
31 Check Filtered Nodes in Topology ${resp.content} 3 bgp:1 bgp:2
33 Filtration IPV4 Inventory Model
34 [Documentation] Test of ipv4 type of filtration operation on Inventory model
35 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1
36 ${request} Insert Filter ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS}
37 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
38 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
39 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
40 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3
42 Filtration Range Number Network Topology Model
43 [Documentation] Test of range number type of filtration operation on Network Topology model
44 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
45 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OVS_VERSION}
46 ${request} Set Range Number Filter ${request} 20 25
47 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 4
48 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
49 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10
51 Filtration Range Number Inventory Model
52 [Documentation] Test of range number type of filtration operation on Inventory model
53 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
54 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_SERIAL_NUMBER}
55 ${request} Set Range Number Filter ${request} 20 25
56 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
57 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
58 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10
60 Filtration Specific String Network Topology Model
61 [Documentation] Test of specific string type of filtration operation on Network Topology model
62 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
63 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_OVS_VERSION}
64 ${request} Set Specific String Filter ${request} 25
65 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 2
66 Should Contain ${resp.content} <topology-id>topo:1</topology-id> ${EMPTY}
67 Check Filtered Nodes in Topology ${resp.content} 2 bgp:9 bgp:10
69 Filtration Specific String Inventory Model
70 [Documentation] Test of specific string type of filtration operation on Inventory model
71 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
72 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER}
73 ${request} Set Specific String Filter ${request} 21
74 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 2
75 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
76 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9
78 Filtration Range String Network Topology Model
79 [Documentation] Test of range string type of filtration operation on Network Topology model
80 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
81 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_OVS_VERSION}
82 ${request} Set Range String Filter ${request} 20 25
83 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 4
84 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
85 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10
87 Filtration Range String Inventory Model
88 [Documentation] Test of range string type of filtration operation on Inventory model
89 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
90 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER}
91 ${request} Set Range String Filter ${request} 20 25
92 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
93 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
94 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10
96 Filtration IPV6 Network Topology Model
97 [Documentation] Test of ipv6 type of filtration operation on Network Topology model
98 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:3
99 ${request} Insert Filter ${request} ${FILTER_IPV6} ${ISIS_NODE_TE_ROUTER_ID_IPV6}
100 ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120
101 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 2
102 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
103 Check Filtered Nodes in Topology ${resp.content} 1 bgp:11 bgp:12
105 Filtration IPV6 Inventory Model
106 [Documentation] Test of ipv6 type of filtration operation on Inventory model
107 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:3
108 ${request} Insert Filter ${request} ${FILTER_IPV6} ${OPENFLOW_NODE_IP_ADDRESS}
109 ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:201/120
110 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
111 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
112 Check Filtered Nodes in Topology ${resp.content} 0 of-node:12 of-node:14 of-node:15
114 Filtration Script Network Topology Model
115 [Documentation] Test of script type of filtration operation on Network Topology model
116 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:1
117 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${ISIS_NODE_TE_ROUTER_ID_IPV4}
118 ${script} Set Variable if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
119 ${request} Set Script Filter ${request} javascript ${script}
120 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
121 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
122 Check Filtered Nodes in Topology ${resp.content} 5 bgp:3 bgp:4 bgp:5
124 Filtration Script Inventory Model
125 [Documentation] Test of script type of filtration operation on Inventory model
126 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1
127 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_IP_ADDRESS}
128 ${script} Set Variable if (node.getValue().indexOf("192.168.2") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
129 ${request} Set Script Filter ${request} javascript ${script}
130 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 3
131 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
132 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3