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 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
21 [Documentation] Test unification operation on Network Topology model
22 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node network-topology-pcep:path-computation-client/network-topology-pcep:ip-address network-topo:1
24 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
25 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
26 Should Contain X Times ${resp.content} <node-id>node: 9
27 : FOR ${index} IN RANGE 1 9
28 \ Should Contain X Times ${resp.content} <node-ref>pcep:${index}</node-ref> 1
29 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='pcep:10']/..
30 ${node} Element to String ${node}
31 Should Contain X Times ${node} <node-ref>pcep:10</node-ref> 1
32 Should Contain X Times ${node} <node-ref>pcep:5</node-ref> 1
34 Unification Node Inventory
35 [Documentation] Test unification operation on inventory model
36 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} opendaylight-inventory-model node flow-node-inventory:ip-address openflow-topo:1
38 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
39 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
40 Should Contain X Times ${resp.content} <node-id>node: 8
41 : FOR ${index} IN RANGE 1 10
42 \ Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
43 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/..
44 ${node} Element to String ${node}
45 Should Contain X Times ${node} <node-ref>of-node:6</node-ref> 1
46 Should Contain X Times ${node} <node-ref>of-node:1</node-ref> 1
47 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:4']/..
48 ${node} Element to String ${node}
49 Should Contain X Times ${node} <node-ref>of-node:10</node-ref> 1
50 Should Contain X Times ${node} <node-ref>of-node:4</node-ref> 1