2 Documentation Test suite to verify unification operation on different models.
3 ... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIG_API to OPERATIONAL_API.
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 ... Suite setup also install features required for tested models, clear karaf logs for further synchronization. Tests themselves send configurational
6 ... xmls and verify output. 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
25 [Documentation] Test unification operation on Network Topology model
26 ${model} Set Variable network-topology-model
27 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2
28 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
29 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
30 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 8
31 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
32 Should Contain X Times ${resp.content} <supporting-node> 10
33 Should Contain X Times ${resp.content} <termination-point 14
34 Should Contain X Times ${resp.content} <tp-ref> 14
35 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:5 bgp:10
36 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
37 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
38 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
39 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:6
40 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
41 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
42 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
44 Unification Node Inventory
45 [Documentation] Test unification operation on inventory model
46 ${model} Set Variable opendaylight-inventory-model
47 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2
48 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
49 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
50 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 7
51 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
52 Should Contain X Times ${resp.content} <supporting-node> 10
53 Should Contain X Times ${resp.content} <termination-point 12
54 Should Contain X Times ${resp.content} <tp-ref> 12
55 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:10 of-node:4
56 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
57 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
58 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:6 of-node:1
59 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
60 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
61 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2
63 Unification Scripting Node
64 [Documentation] Test unification operation on Network Topology model using scripting
65 ${model} Set Variable network-topology-model
66 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2
67 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
68 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
69 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
70 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 9
71 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
72 Should Contain X Times ${resp.content} <supporting-node> 10
73 Should Contain X Times ${resp.content} <termination-point 14
74 Should Contain X Times ${resp.content} <tp-ref> 14
75 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:10
76 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
77 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
78 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
79 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:1 bgp:6
80 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
81 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:4
82 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:3
83 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
85 Unification Scripting Node Inventory
86 [Documentation] Test unification operation on inventory model using scripting
87 ${model} Set Variable opendaylight-inventory-model
88 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2
89 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
90 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
91 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
92 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 9
93 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
94 Should Contain X Times ${resp.content} <supporting-node> 10
95 Should Contain X Times ${resp.content} <termination-point 12
96 Should Contain X Times ${resp.content} <tp-ref> 12
97 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
98 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:9
99 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2 of-node:8
100 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7
101 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
102 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
103 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:4
104 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
105 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:1
107 Unification Node Inside
108 [Documentation] Test of unification type of aggregation inside on nodes on Network Topology model
109 ${model} Set Variable network-topology-model
110 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node network-topo:1
111 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
112 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 4
113 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
114 Should Contain X Times ${resp.content} <supporting-node> 5
115 Should Contain X Times ${resp.content} <termination-point 8
116 Should Contain X Times ${resp.content} <tp-ref> 8
117 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
118 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
119 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
120 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
122 Unification Node Inside Inventory
123 [Documentation] Test of unification type of aggregation inside on nodes on Inventory model
124 ${model} Set Variable opendaylight-inventory-model
125 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node openflow-topo:2
126 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
127 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 4
128 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
129 Should Contain X Times ${resp.content} <supporting-node> 5
130 Should Contain X Times ${resp.content} <termination-point 0
131 Should Contain X Times ${resp.content} <supporting-termination-point> 0
132 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
133 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
134 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
135 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
137 Unification Termination Point Inside
138 [Documentation] Test aggregate inside operation on termination points
139 ${model} Set Variable network-topology-model
140 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} termination-point network-topo:1
141 ${request} Insert Target Field ${request} 0 ${OVSDB_OFPORT} 0
142 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
143 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
144 Should Contain X Times ${resp.content} <supporting-node> 5
145 Should Contain X Times ${resp.content} <tp-ref> 8
146 Should Contain X Times ${resp.content} <termination-point 6
147 ${topology_id} Set Variable network-topo:1
148 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:1 tp:1:1 tp:1:1
150 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:1 tp:1:3 tp:1:3
151 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:3 tp:3:1 tp:3:1
152 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:3 tp:3:2 tp:3:2
153 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:4 tp:4:1 tp:4:1
155 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:5 tp:5:1 tp:5:1
157 Unification Termination Point Inside Inventory
158 [Documentation] Test aggregate inside operation on termination points
159 ${model} Set Variable opendaylight-inventory-model
160 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} termination-point openflow-topo:1
161 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER} 0
162 ${resp} Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 5
163 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
164 Should Contain X Times ${resp.content} <supporting-node> 5
165 Should Contain X Times ${resp.content} <tp-ref> 12
166 Should Contain X Times ${resp.content} <termination-point> 8
167 ${topology_id} Set Variable openflow-topo:1
168 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:5 tp:5:1 tp:5:1
169 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:4 tp:4:1 tp:4:1
171 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:3 tp:3:1 tp:3:1
173 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:3 tp:3:3 tp:3:3
174 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:1 tp:2:1
175 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:2 tp:2:2
176 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:3 tp:2:3
177 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:1 tp:1:1 tp:1:1