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 Test Teardown network-topology:network-topology/topology/topo:1
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 Unification Filtration Node Inside Network Topology model
21 [Documentation] Test unification filtration inside operation on Network Topology model
22 ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} network-topology-model node l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 network-topo:4
23 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 1
24 ${request} Insert Apply Filters ${request} 1 1
25 ${request} Set IPV4 Filter ${request} 192.168.2.1/24
26 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
27 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
28 Should Contain X Times ${resp.content} <node-id>node: 2
29 Should Contain ${resp.content} <node-ref>bgp: 3
30 : FOR ${index} IN RANGE 18 21
31 \ Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
32 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:18']/..
33 ${node} Element to String ${node}
34 Should Contain X Times ${node} <supporting-node> 2
35 Should Contain ${node} <node-ref>bgp:18</node-ref>
36 Should Contain ${node} <node-ref>bgp:20</node-ref>
38 Unification Filtration Node Inside Inventory model
39 [Documentation] Test unification filtration inside operation on Inventory model
40 ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:4
41 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} flow-node-inventory:ip-address 1
42 ${request} Insert Apply Filters ${request} 1 1
43 ${request} Set IPV4 Filter ${request} 192.168.2.1/24
44 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
45 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
46 Should Contain X Times ${resp.content} <node-id>node: 2
47 Should Contain ${resp.content} <node-ref>of-node: 4
48 : FOR ${index} IN RANGE 17 21
49 \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
50 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:17']/..
51 ${node} Element to String ${node}
52 Should Contain X Times ${node} <supporting-node> 3
53 Should Contain ${node} <node-ref>of-node:17</node-ref>
54 Should Contain ${node} <node-ref>of-node:19</node-ref>
55 Should Contain ${node} <node-ref>of-node:20</node-ref>
57 Unification Filtration Termination Point Inside Network Topology model
58 [Documentation] Test unification filtration inside operation on Network Topology model
59 ${request} Prepare Unification Filtration Inside Topology Request ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point ovsdb:name network-topo:5
60 ${request} Insert Filter With ID ${request} ${FILTER_SPECIFIC_STRING} ovsdb:name 1
61 ${request} Insert Apply Filters ${request} 1 1
62 ${request} Set Specific String Filter ${request} portA
63 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
64 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
65 Should Contain X Times ${resp.content} <node-id>node: 5
66 Should Contain X Times ${resp.content} <termination-point> 3
67 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:21']/..
68 ${node} Element to String ${node}
69 Should Contain X Times ${node} <termination-point> 1
70 Should Contain X Times ${node} <tp-ref> 3
71 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:21/termination-point/tp:21:2</tp-ref>
72 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:21/termination-point/tp:21:1</tp-ref>
73 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:21/termination-point/tp:21:3</tp-ref>
74 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:22']/..
75 ${node} Element to String ${node}
76 Should Contain X Times ${node} <termination-point> 1
77 Should Contain X Times ${node} <tp-ref> 1
78 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:22/termination-point/tp:22:1</tp-ref>
79 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:24']/..
80 ${node} Element to String ${node}
81 Should Contain X Times ${node} <termination-point> 1
82 Should Contain X Times ${node} <tp-ref> 2
83 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:24/termination-point/tp:24:1</tp-ref>
84 Should Contain ${node} <tp-ref>/network-topology:network-topology/topology/network-topo:5/node/bgp:24/termination-point/tp:24:2</tp-ref>
86 Unification Filtration Node Network Topology model
87 [Documentation] Test unification filtration operation on Network Topology model
88 ${target_field} Set Variable l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4
89 ${request} Prepare Unification Filtration Topology Request ${UNIFICATION_FILTRATION_NT} network-topology-model node ${target_field} network-topo:4
90 ... ${target_field} network-topo:1
91 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4 1
92 ${request} Insert Apply Filters ${request} 1 1
93 ${request} Insert Apply Filters ${request} 2 1
94 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
95 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
96 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
97 Should Contain X Times ${resp.content} <node> 2
98 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/..
99 ${node} Element to String ${node}
100 Should Contain X Times ${node} <supporting-node> 2
101 Should Contain X Times ${node} <node-ref>bgp:1</node-ref> 1
102 Should Contain X Times ${node} <node-ref>bgp:16</node-ref> 1
103 Should Contain X Times ${node} <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:3</tp-ref> 1
104 Should Contain X Times ${node} <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:2</tp-ref> 1
105 Should Contain X Times ${node} <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1</tp-ref> 1
106 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:2']/..
107 ${node} Element to String ${node}
108 Should Contain X Times ${node} <supporting-node> 2
109 Should Contain X Times ${node} <node-ref>bgp:2</node-ref> 1
110 Should Contain X Times ${node} <node-ref>bgp:17</node-ref> 1
112 Unification Filtration Node Inventory model
113 [Documentation] Test unification filtration operation on Inventory model
114 ${request} Prepare Unification Filtration Topology Request ${UNIFICATION_FILTRATION_NT} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:4
115 ... flow-node-inventory:ip-address openflow-topo:6
116 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} flow-node-inventory:ip-address 1
117 ${request} Insert Apply Filters ${request} 1 1
118 ${request} Insert Apply Filters ${request} 2 1
119 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
120 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
121 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
122 Should Contain X Times ${resp.content} <node> 2
123 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:26']/..
124 ${node} Element to String ${node}
125 Should Contain X Times ${node} <node-ref>of-node:26</node-ref> 1
126 Should Contain X Times ${node} <node-ref>of-node:16</node-ref> 1
127 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:28']/..
128 ${node} Element to String ${node}
129 Should Contain X Times ${node} <node-ref>of-node:28</node-ref> 1