${node} Element to String ${node}
Should Contain X Times ${node} <node-ref>of-node:10</node-ref> 1
Should Contain X Times ${node} <node-ref>of-node:4</node-ref> 1
-
Unification Scripting Node
[Documentation] Test unification operation on Network Topology model using scripting
${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
Should Contain X Times ${node} <supporting-node> 2
Should Contain ${node} <supporting-node><node-ref>of-node:7</node-ref>
Should Contain ${node} <supporting-node><node-ref>of-node:9</node-ref>
+
+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 ovsdb:ofport network-topo:1
+ ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
+ Should Contain ${resp.content} <topology-id>topo:1</topology-id>
+ ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1']
+ ${response_xml} Element to String ${response_xml}
+ Should Contain X Times ${resp.content} <node-id>node: 5
+ Should Contain X Times ${response_xml} <termination-point> 6
+ ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:1']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:3']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:4']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
+ ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:5']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 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 flow-node-inventory:port-number openflow-topo:1
+ ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
+ Should Contain ${resp.content} <topology-id>topo:1</topology-id>
+ ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1']
+ ${response_xml} Element to String ${response_xml}
+ Should Contain X Times ${resp.content} <node-id>node: 5
+ Should Contain X Times ${response_xml} <termination-point> 7
+ ${node} Get Element ${response_xml} 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 ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:2']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 2
+ ${node} Get Element ${response_xml} 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 ${response_xml} 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 ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:5']/..
+ ${node} Element to String ${node}
+ Should Contain X Times ${node} <termination-point> 1
\ No newline at end of file
NETWORK_UNDERLAY_TOPOLOGY_1 = '''<topology
xmlns="urn:TBD:params:xml:ns:yang:network-topology"
- xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
+ xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep"
+ xmlns:ovsdb="urn:opendaylight:params:xml:ns:yang:ovsdb">
<topology-id>network-topo:1</topology-id>
<topology-types>
<pcep:topology-pcep></pcep:topology-pcep>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.1</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:1:1</tp-id>
+ <ovsdb:ofport>1119</ovsdb:ofport>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:1:2</tp-id>
+ <ovsdb:ofport>1119</ovsdb:ofport>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:1:3</tp-id>
+ <ovsdb:ofport>2119</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:2</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.1</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:3:1</tp-id>
+ <ovsdb:ofport>1118</ovsdb:ofport>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:3:2</tp-id>
+ <ovsdb:ofport>2118</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:4</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.1</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:4:1</tp-id>
+ <ovsdb:ofport>1117</ovsdb:ofport>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:4:2</tp-id>
+ <ovsdb:ofport>1117</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:5</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.3</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:5:1</tp-id>
+ <ovsdb:ofport>1116</ovsdb:ofport>
+ </termination-point>
</node>
</topology>'''
NETWORK_UNDERLAY_TOPOLOGY_2 = '''<topology
xmlns="urn:TBD:params:xml:ns:yang:network-topology"
- xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
+ xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep"
+ xmlns:ovsdb="urn:opendaylight:params:xml:ns:yang:ovsdb">
<topology-id>network-topo:2</topology-id>
<topology-types>
<pcep:topology-pcep></pcep:topology-pcep>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.3</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:6:1</tp-id>
+ <ovsdb:ofport>1116</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:7</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.4</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:7:1</tp-id>
+ <ovsdb:ofport>1117</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:8</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.4</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:8:1</tp-id>
+ <ovsdb:ofport>11120</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:9</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.5</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:9:1</tp-id>
+ <ovsdb:ofport>1121</ovsdb:ofport>
+ </termination-point>
</node>
<node>
<node-id>pcep:10</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.2.3</pcep:ip-address>
</pcep:path-computation-client>
+ <termination-point>
+ <tp-id>tp:10:1</tp-id>
+ <ovsdb:ofport>1122</ovsdb:ofport>
+ </termination-point>
</node>
</topology>'''
xmlns:flov-inv="urn:opendaylight:flow:inventory">
<node>
<id>openflow:1</id>
+ <node-connector>
+ <id>openflow:1:1</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:1:2</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
<flov-inv:manufacturer>Pantheon Technologies</flov-inv:manufacturer>
<flov-inv:ip-address>192.168.1.1</flov-inv:ip-address>
</node>
<node>
<id>openflow:2</id>
+ <node-connector>
+ <id>openflow:2:1</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:2:2</id>
+ <flov-inv:port-number>2</flov-inv:port-number>
+ </node-connector>
<flov-inv:manufacturer>Pantheon Technologies</flov-inv:manufacturer>
<flov-inv:ip-address>192.168.1.2</flov-inv:ip-address>
</node>
<node>
<id>openflow:3</id>
+ <node-connector>
+ <id>openflow:3:1</id>
+ <flov-inv:port-number>2</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:3:2</id>
+ <flov-inv:port-number>2</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:3:3</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
<flov-inv:manufacturer>Pantheon Technologies</flov-inv:manufacturer>
<flov-inv:ip-address>192.168.1.3</flov-inv:ip-address>
</node>
<node>
<id>openflow:4</id>
+ <node-connector>
+ <id>openflow:4:1</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:4:2</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
+ <node-connector>
+ <id>openflow:4:3</id>
+ <flov-inv:port-number>1</flov-inv:port-number>
+ </node-connector>
<flov-inv:manufacturer>Cisco</flov-inv:manufacturer>
<flov-inv:ip-address>192.168.2.1</flov-inv:ip-address>
</node>
<node>
<id>openflow:5</id>
+ <node-connector>
+ <id>openflow:5:1</id>
+ <flov-inv:port-number>3</flov-inv:port-number>
+ </node-connector>
<flov-inv:manufacturer>Cisco</flov-inv:manufacturer>
<flov-inv:ip-address>192.168.2.2</flov-inv:ip-address>
</node>
<node>
<node-id>of-node:1</node-id>
<inventory-topo:inventory-node-ref>/inventory:nodes/inventory:node[inventory:id="openflow:1"]</inventory-topo:inventory-node-ref>
+ <termination-point>
+ <tp-id>tp:1:1</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:1"]/inventory:node-connector[inventory:id="openflow:1:1"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:1:2</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:1"]/inventory:node-connector[inventory:id="openflow:1:2"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
</node>
<node>
<node-id>of-node:2</node-id>
<inventory-topo:inventory-node-ref>/inventory:nodes/inventory:node[inventory:id="openflow:2"]</inventory-topo:inventory-node-ref>
+ <termination-point>
+ <tp-id>tp:2:1</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:1"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:2:2</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:2"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
</node>
<node>
<node-id>of-node:3</node-id>
<inventory-topo:inventory-node-ref>/inventory:nodes/inventory:node[inventory:id="openflow:3"]</inventory-topo:inventory-node-ref>
+ <termination-point>
+ <tp-id>tp:3:1</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:1"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:3:2</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:2"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:3:3</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:3"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
</node>
<node>
<node-id>of-node:4</node-id>
<inventory-topo:inventory-node-ref>/inventory:nodes/inventory:node[inventory:id="openflow:4"]</inventory-topo:inventory-node-ref>
+ <termination-point>
+ <tp-id>tp:4:1</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:1"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:4:2</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:2"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
+ <termination-point>
+ <tp-id>tp:4:3</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:3"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
</node>
<node>
<node-id>of-node:5</node-id>
<inventory-topo:inventory-node-ref>/inventory:nodes/inventory:node[inventory:id="openflow:5"]</inventory-topo:inventory-node-ref>
+ <termination-point>
+ <tp-id>tp:5:1</tp-id>
+ <inventory-topo:inventory-node-connector-ref>
+ /inventory:nodes/inventory:node[inventory:id="openflow:5"]/inventory:node-connector[inventory:id="openflow:5:1"]
+ </inventory-topo:inventory-node-connector-ref>
+ </termination-point>
</node>
</topology>
'''