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 IPV4 Network Topology Model
22 [Documentation] Test of ipv4 type of filtration operation on Network Topology model
23 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:1
24 ${request} Insert Filter ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4}
25 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
26 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
27 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=3 tp-ref_count=3
28 Check Filtered Nodes in Topology ${resp.content} 3 bgp:1 bgp:2
30 Filtration IPV4 Inventory Model
31 [Documentation] Test of ipv4 type of filtration operation on Inventory model
32 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1
33 ${request} Insert Filter ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS}
34 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
35 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
36 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=8 tp-ref_count=8
37 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3
39 Filtration Range Number Network Topology Model
40 [Documentation] Test of range number type of filtration operation on Network Topology model
41 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
42 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OVS_VERSION}
43 ${request} Set Range Number Filter ${request} 20 25
44 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
45 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=5 tp-ref_count=5
46 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10
48 Filtration Range Number Inventory Model
49 [Documentation] Test of range number type of filtration operation on Inventory model
50 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
51 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_SERIAL_NUMBER}
52 ${request} Set Range Number Filter ${request} 20 25
53 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
54 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0
55 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10
57 Filtration Specific String Network Topology Model
58 [Documentation] Test of specific string type of filtration operation on Network Topology model
59 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
60 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_OVS_VERSION}
61 ${request} Set Specific String Filter ${request} 25
62 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
63 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=2 tp-ref_count=2
64 Check Filtered Nodes in Topology ${resp.content} 2 bgp:9 bgp:10
66 Filtration Specific String Inventory Model
67 [Documentation] Test of specific string type of filtration operation on Inventory model
68 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
69 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER}
70 ${request} Set Specific String Filter ${request} 21
71 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
72 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=0 tp-ref_count=0
73 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9
75 Filtration Range String Network Topology Model
76 [Documentation] Test of range string type of filtration operation on Network Topology model
77 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:2
78 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_OVS_VERSION}
79 ${request} Set Range String Filter ${request} 20 25
80 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
81 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=4 node-ref_count=4 tp_count=5 tp-ref_count=5
82 Check Filtered Nodes in Topology ${resp.content} 5 bgp:7 bgp:8 bgp:9 bgp:10
84 Filtration Range String Inventory Model
85 [Documentation] Test of range string type of filtration operation on Inventory model
86 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:2
87 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_SERIAL_NUMBER}
88 ${request} Set Range String Filter ${request} 20 25
89 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
90 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0
91 Check Filtered Nodes in Topology ${resp.content} 0 of-node:8 of-node:9 of-node:10
93 Filtration IPV6 Network Topology Model
94 [Documentation] Test of ipv6 type of filtration operation on Network Topology model
95 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:3
96 ${request} Insert Filter ${request} ${FILTER_IPV6} ${ISIS_NODE_TE_ROUTER_ID_IPV6}
97 ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120
98 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
99 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=2 supporting-node_count=2 node-ref_count=2 tp_count=1 tp-ref_count=1
100 Check Filtered Nodes in Topology ${resp.content} 1 bgp:11 bgp:12
102 Filtration IPV6 Inventory Model
103 [Documentation] Test of ipv6 type of filtration operation on Inventory model
104 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:3
105 ${request} Insert Filter ${request} ${FILTER_IPV6} ${OPENFLOW_NODE_IP_ADDRESS}
106 ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:201/120
107 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
108 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=0 tp-ref_count=0
109 Check Filtered Nodes in Topology ${resp.content} 0 of-node:12 of-node:14 of-node:15
111 Filtration Script Network Topology Model
112 [Documentation] Test of script type of filtration operation on Network Topology model
113 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model node network-topo:1
114 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${ISIS_NODE_TE_ROUTER_ID_IPV4}
115 ${script} Set Variable if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
116 ${request} Set Script Filter ${request} javascript ${script}
117 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
118 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=5 tp-ref_count=5
119 Check Filtered Nodes in Topology ${resp.content} 5 bgp:3 bgp:4 bgp:5
121 Filtration Script Inventory Model
122 [Documentation] Test of script type of filtration operation on Inventory model
123 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model node openflow-topo:1
124 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_IP_ADDRESS}
125 ${script} Set Variable if (node.getValue().indexOf("192.168.2") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
126 ${request} Set Script Filter ${request} javascript ${script}
127 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
128 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=3 supporting-node_count=3 node-ref_count=3 tp_count=8 tp-ref_count=8
129 Check Filtered Nodes in Topology ${resp.content} 8 of-node:1 of-node:2 of-node:3