+
+Unification Termination Point Inside
+ [Documentation] Test aggregate inside operation on termination points
+ ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point network-topo:1
+ ${request} Insert Target Field ${request} 0 ovsdb:ofport 0
+ ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
+ Should Contain ${resp.content} <topology-id>topo:1</topology-id>
+ Should Contain X Times ${resp.content} <node-id>node: 5
+ Should Contain X Times ${resp.content} <termination-point> 6
+ # bgp:1
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:3']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:3</tp-ref> 1
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1</tp-ref> 1
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:2</tp-ref> 1
+ # bgp:3
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:3']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:2']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:2</tp-ref> 1
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:1']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:1</tp-ref> 1
+ # bgp:4
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:4']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:1']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:1</tp-ref> 1
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:2</tp-ref> 1
+ # bgp:5
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:5']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ ${tp} Get Element ${node} xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:5/termination-point/tp:5:1']
+ ${tp} Element to String ${tp}
+ Should Contain X Times ${tp} <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:5/termination-point/tp:5:1</tp-ref> 1
+
+Unification Termination Point Inside Inventory
+ [Documentation] Test aggregate inside operation on termination points
+ ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model termination-point openflow-topo:1
+ ${request} Insert Target Field ${request} 0 flow-node-inventory:port-number 0
+ ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
+ Should Contain ${resp.content} <topology-id>topo:1</topology-id>
+ Should Contain X Times ${resp.content} <node-id>node: 5
+ Should Contain X Times ${resp.content} <termination-point> 8
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 3
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:4']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ [Teardown] Run Keywords Aggregation Test Teardown
+ ... AND Report_Failure_Due_To_Bug 4674
+
+*** Keywords ***
+Aggregation Test Teardown
+ Test Teardown network-topology:network-topology/topology/topo:1
+ Report_Failure_Due_To_Bug 5157